1
"""
数据模型定义 - 确保类型安全和数据一致性
"""
from typing import TypedDict, List, Optional
from datetime import datetime
class Shareholder(TypedDict):
"""股东数据结构"""
id: str
name: str
join_date: str
shares: int
total_contribution: float
status: str # 'active', 'inactive'
class DividendResult(TypedDict):
"""分红计算结果"""
monthly_net_profit: float
profit_pool_ratio: float
profit_pool_amount: float
total_shares: int
share_value: float
total_shareholders: int
total_distributed: float
dividend_details: dict
class FinancialRecord(TypedDict):
"""财务审计记录"""
timestamp: str
description: str
data: dict