feat: add agreement workflow and project-scoped work items

This commit is contained in:
Александр Арсентьев
2026-09-25 20:33:07 +03:00
parent d0b5745f8f
commit e72ba68cad
20 changed files with 1155 additions and 68 deletions
+2
View File
@@ -49,6 +49,7 @@ class AgreementItem(Base):
source_manufacturer = Column(String)
source_unit = Column(String)
source_unit_price = Column(Numeric(18, 12))
source_boq_document_id = Column(Integer, ForeignKey("boq_documents.id"), nullable=True)
source_system_id = Column(Integer, ForeignKey("systems.id"))
source_section_id = Column(Integer, ForeignKey("sections.id"))
created_at = Column(DateTime, nullable=False, server_default=func.now())
@@ -58,3 +59,4 @@ class AgreementItem(Base):
work_item = relationship("WorkItem")
source_system = relationship("System")
source_section = relationship("Section")
source_boq_document = relationship("BoqDocument", foreign_keys=[source_boq_document_id])
+1 -1
View File
@@ -60,7 +60,7 @@ class WorkItem(Base):
id = Column(Integer, primary_key=True, index=True)
project_id = Column(Integer, ForeignKey("projects.id"), nullable=False)
boq_document_id = Column(Integer, ForeignKey("boq_documents.id"), nullable=False)
boq_document_id = Column(Integer, ForeignKey("boq_documents.id"), nullable=True)
system_id = Column(Integer, ForeignKey("systems.id"))
section_id = Column(Integer, ForeignKey("sections.id"))
source_number = Column(String)
+1 -1
View File
@@ -10,7 +10,7 @@ class DailyReport(Base):
id = Column(Integer, primary_key=True, index=True)
project_id = Column(Integer, ForeignKey("projects.id"), nullable=False, index=True)
system_id = Column(Integer, ForeignKey("systems.id"), nullable=False, index=True)
system_id = Column(Integer, ForeignKey("systems.id"), nullable=True, index=True)
report_date = Column(Date, nullable=False, index=True)
notes = Column(Text)
created_at = Column(DateTime, nullable=False, server_default=func.now())