"""LeAudit 交叉评查任务模型。"""

from __future__ import annotations

from sqlalchemy import BigInteger, String
from sqlalchemy.orm import Mapped, mapped_column

from fastapi_common.fastapi_common_web.models import BaseModel


class LeauditCrossReviewTask(BaseModel):
    """交叉评查任务主表。"""

    __tablename__ = "leaudit_cross_review_tasks"

    Id: Mapped[int] = mapped_column("id", BigInteger, primary_key=True, autoincrement=True)
    taskName: Mapped[str] = mapped_column("task_name", String(255), comment="任务名称")
    taskType: Mapped[str] = mapped_column("task_type", String(32), comment="任务类型")
    docTypeId: Mapped[int | None] = mapped_column("doc_type_id", BigInteger, comment="文档类型ID")
    docTypeCode: Mapped[str | None] = mapped_column("doc_type_code", String(64), comment="文档类型编码")
    assignerId: Mapped[int] = mapped_column("assigner_id", BigInteger, comment="创建者ID")
    status: Mapped[str] = mapped_column("status", String(32), default="in_progress", comment="任务状态")
