|
@@ -4,35 +4,53 @@ from sqlalchemy.ext.declarative import declarative_base
|
|
|
|
|
|
Base = declarative_base()
|
|
|
|
|
|
+
|
|
|
class ProjectQuotaModel(Base):
|
|
|
- __tablename__ = 'project_quota'
|
|
|
+ __tablename__ = "project_quota"
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
|
- task_id = Column(Integer, nullable=False, comment='任务编号')
|
|
|
- project_id = Column(String(50), nullable=False, comment='项目编号')
|
|
|
- budget_id = Column(Integer, nullable=False, comment='概算序号')
|
|
|
- budget_code = Column(String(50), comment='概算编号')
|
|
|
- item_id = Column(Integer, nullable=False, comment='条目序号')
|
|
|
- item_code = Column(String(255), nullable=False, comment='条目编号')
|
|
|
- quota_id = Column(Integer, nullable=False, default=0, comment='定额序号')
|
|
|
- quota_code = Column(String(50), comment='定额编号')
|
|
|
- entry_name = Column(String(255), comment='工程或费用项目名称')
|
|
|
- units = Column(String(20), comment='单位')
|
|
|
- amount = Column(Float, comment='数量')
|
|
|
- ex_file = Column(String(5000), comment='excel⽂件')
|
|
|
+ task_id = Column(Integer, nullable=False, comment="任务编号")
|
|
|
+ project_id = Column(String(50), nullable=False, comment="项目编号")
|
|
|
+ budget_id = Column(Integer, nullable=False, comment="概算序号")
|
|
|
+ budget_code = Column(String(50), comment="概算编号")
|
|
|
+ item_id = Column(Integer, nullable=False, comment="条目序号")
|
|
|
+ item_code = Column(String(255), nullable=False, comment="条目编号")
|
|
|
+ quota_id = Column(Integer, nullable=False, default=0, comment="定额序号")
|
|
|
+ quota_code = Column(String(50), comment="定额编号")
|
|
|
+ quota_adjustment = Column(String(50), comment="定额调整")
|
|
|
+ entry_name = Column(String(255), comment="工程或费用项目名称")
|
|
|
+ units = Column(String(20), comment="单位")
|
|
|
+ amount = Column(Float, comment="数量")
|
|
|
+ ex_file = Column(String(5000), comment="excel⽂件")
|
|
|
ex_cell = Column(String(50), comment='数量单元格位置,例如"C17"')
|
|
|
- ex_row = Column(String(5000), comment='该⾏内容,由逗号连接多个单元格得到')
|
|
|
- ex_unit = Column(String(50), comment='excel中给出的单位')
|
|
|
- ex_amount = Column(Float, comment='excel中给出的数量')
|
|
|
- send_status = Column(Integer, nullable=False, default=0, comment='发送状态(0:未发送,1:发送中 ,2:已发送, 3:发送失败)')
|
|
|
- send_time = Column(DateTime, comment='发送时间')
|
|
|
- send_error = Column(String(5000), comment='发送错误信息')
|
|
|
- is_del = Column(Integer, nullable=False, default=0, comment='是否删除(0:否, 1:是)')
|
|
|
- deleted_by = Column(String(50), comment='删除人')
|
|
|
- deleted_at = Column(DateTime, comment='删除时间')
|
|
|
- created_by = Column(String(50), comment='创建人')
|
|
|
- created_at = Column(DateTime, nullable=False, server_default=func.current_timestamp(), comment='创建时间')
|
|
|
- updated_by = Column(String(50), comment='更新人')
|
|
|
- updated_at = Column(DateTime, nullable=False, server_default=func.current_timestamp(), server_onupdate=func.current_timestamp(), comment='更新时间')
|
|
|
+ ex_row = Column(String(5000), comment="该⾏内容,由逗号连接多个单元格得到")
|
|
|
+ ex_unit = Column(String(50), comment="excel中给出的单位")
|
|
|
+ ex_amount = Column(Float, comment="excel中给出的数量")
|
|
|
+ send_status = Column(
|
|
|
+ Integer,
|
|
|
+ nullable=False,
|
|
|
+ default=0,
|
|
|
+ comment="发送状态(0:未发送,1:发送中 ,2:已发送, 3:发送失败)",
|
|
|
+ )
|
|
|
+ send_time = Column(DateTime, comment="发送时间")
|
|
|
+ send_error = Column(String(5000), comment="发送错误信息")
|
|
|
+ is_del = Column(Integer, nullable=False, default=0, comment="是否删除(0:否, 1:是)")
|
|
|
+ deleted_by = Column(String(50), comment="删除人")
|
|
|
+ deleted_at = Column(DateTime, comment="删除时间")
|
|
|
+ created_by = Column(String(50), comment="创建人")
|
|
|
+ created_at = Column(
|
|
|
+ DateTime,
|
|
|
+ nullable=False,
|
|
|
+ server_default=func.current_timestamp(),
|
|
|
+ comment="创建时间",
|
|
|
+ )
|
|
|
+ updated_by = Column(String(50), comment="更新人")
|
|
|
+ updated_at = Column(
|
|
|
+ DateTime,
|
|
|
+ nullable=False,
|
|
|
+ server_default=func.current_timestamp(),
|
|
|
+ server_onupdate=func.current_timestamp(),
|
|
|
+ comment="更新时间",
|
|
|
+ )
|
|
|
|
|
|
def __repr__(self):
|
|
|
- return f"<ProjectQuota(id='{self.id}', project_id='{self.project_id}')>"
|
|
|
+ return f"<ProjectQuota(id='{self.id}', project_id='{self.project_id}')>"
|