"""平台账号 Schema"""

from datetime import datetime
from typing import Optional

from sqlmodel import SQLModel


class AccountBase(SQLModel):
    name: str
    platform: Optional[str] = None
    remark: Optional[str] = None


class AccountCreate(AccountBase):
    pass


class AccountUpdate(SQLModel):
    name: Optional[str] = None
    platform: Optional[str] = None
    remark: Optional[str] = None


class AccountRead(AccountBase):
    id: int
    created_at: datetime
    asset_count: int = 0  # 引用该账号的资产数（列表接口填充）
