feat: 应收款催收闭环 — 催收视图+博海230万录入+回款登记联动
This commit is contained in:
@@ -427,16 +427,19 @@ class CashForecast(Base):
|
||||
|
||||
|
||||
class CashPlan(Base):
|
||||
"""收付款计划 — 资金管理智能体"""
|
||||
"""收付款计划 — 资金管理智能体(唯一应收载体:含回款登记、负责人、数据来源)"""
|
||||
__tablename__ = "cash_plans"
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
entity_id = Column(Integer, ForeignKey("entities.id"), default=1, comment="企业ID")
|
||||
plan_type = Column(String(10), nullable=False, comment="receive收/pay付")
|
||||
amount = Column(Float, nullable=False, comment="金额(万元)")
|
||||
plan_date = Column(DateTime, nullable=False, comment="计划日期")
|
||||
plan_date = Column(DateTime, nullable=False, comment="计划日期(应收即到期日)")
|
||||
counterparty = Column(String(200), nullable=True, comment="关联客户/供应商")
|
||||
description = Column(String(500), nullable=True, comment="说明")
|
||||
status = Column(String(20), default="pending", comment="pending/completed/cancelled")
|
||||
owner = Column(String(100), nullable=True, comment="负责人/业务员(应收催收责任人)")
|
||||
source = Column(String(50), default="manual", comment="数据来源: manual/bohai_ar/receivables_migrate")
|
||||
paid_amount = Column(Float, default=0, comment="已回款金额(万元)")
|
||||
completed_at = Column(DateTime, nullable=True, comment="完成时间")
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
||||
|
||||
Reference in New Issue
Block a user