feat:新增接口
This commit is contained in:
+14
-20
@@ -1,5 +1,4 @@
|
||||
"""biz_work_order 工单表 ORM 模型。"""
|
||||
|
||||
"""biz_work_order 通用业务工单 ORM 模型(拦截/冻结后开启的独立审批链)。"""
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
@@ -12,26 +11,21 @@ from model.base import Base
|
||||
|
||||
|
||||
class BizWorkOrder(Base):
|
||||
"""客户工单状态记录。"""
|
||||
|
||||
__tablename__ = "biz_work_order"
|
||||
__table_args__ = {"comment": "通用业务工单表"}
|
||||
__table_args__ = {"comment": "通用业务工单表(投标顾签约、可疑交易上报等流程载体)"}
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
||||
work_order_no: Mapped[str] = mapped_column(String(32), nullable=False)
|
||||
order_type: Mapped[str] = mapped_column(String(32), nullable=False)
|
||||
sub_type: Mapped[str | None] = mapped_column(String(32), nullable=True)
|
||||
customer_id: Mapped[int | None] = mapped_column(BigInteger, nullable=True)
|
||||
submitter_id: Mapped[int | None] = mapped_column(BigInteger, nullable=True)
|
||||
handler_id: Mapped[int | None] = mapped_column(BigInteger, nullable=True)
|
||||
current_node: Mapped[str] = mapped_column(String(32), nullable=False)
|
||||
priority: Mapped[str] = mapped_column(String(8), nullable=False)
|
||||
status: Mapped[str] = mapped_column(String(16), nullable=False)
|
||||
biz_content: Mapped[dict[str, Any] | None] = mapped_column(JSON, nullable=True)
|
||||
create_time: Mapped[datetime] = mapped_column(
|
||||
DateTime, server_default=func.now(), nullable=False
|
||||
)
|
||||
work_order_no: Mapped[str] = mapped_column(String(32), unique=True)
|
||||
order_type: Mapped[str] = mapped_column(String(32))
|
||||
sub_type: Mapped[str | None] = mapped_column(String(32))
|
||||
customer_id: Mapped[int | None] = mapped_column(BigInteger)
|
||||
submitter_id: Mapped[int | None] = mapped_column(BigInteger)
|
||||
handler_id: Mapped[int | None] = mapped_column(BigInteger)
|
||||
current_node: Mapped[str] = mapped_column(String(32), server_default="初审")
|
||||
priority: Mapped[str] = mapped_column(String(8), server_default="普通")
|
||||
status: Mapped[str] = mapped_column(String(16), server_default="待处理")
|
||||
biz_content: Mapped[dict[str, Any] | None] = mapped_column(JSON)
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, server_default=func.now())
|
||||
update_time: Mapped[datetime] = mapped_column(
|
||||
DateTime, server_default=func.now(), onupdate=func.now(), nullable=False
|
||||
DateTime, server_default=func.now(), onupdate=func.now()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user