This commit is contained in:
2026-01-16 18:16:33 +08:00
parent 9f3c96ce73
commit e53c3c838c
26 changed files with 1473 additions and 386 deletions

View File

@@ -11,6 +11,7 @@ class DitRecord(Base):
id = Column(Integer, primary_key=True, index=True)
op_id = Column(String(255), index=True, nullable=False) # 移除 unique因為同一 op_id 可有多個 pn
op_name = Column(String(255), nullable=True) # Opportunity Name
erp_account = Column(String(100), index=True) # AQ 欄
customer = Column(String(255), nullable=False, index=True)
customer_normalized = Column(String(255), index=True)

View File

@@ -16,5 +16,6 @@ class OrderRecord(Base):
qty = Column(Integer, default=0)
status = Column(String(50), default='Backlog') # 改為 String 以支援中文狀態
amount = Column(Float, default=0.0)
date = Column(String(20)) # 訂單日期
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())