feat(backend): add BizQcMaterialMonthTemplate model

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-08-19 12:41:58 +08:00
1 parent c591dab5ff
commit 450b30966d
2 files changed
+28 -1

No files matched your search

+1 -1
View File
@@ -4009,7 +4009,7 @@ class BizEnvDetectRecord(Base):
from app.models.qc_param import BizQcItemParam, BizQcTaskResult # noqa: E402,F401
from app.models.qc_material import BizQcMaterial, BizQcMaterialStockBatch, BizQcMaterialUsage # noqa: E402,F401
from app.models.qc_material import BizQcMaterial, BizQcMaterialMonthTemplate, BizQcMaterialStockBatch, BizQcMaterialUsage # noqa: E402,F401
from app.models.production_material import ( # noqa: E402,F401
BizProductionMaterial,
BizProductionMaterialStockBatch,
+27
View File
@@ -27,6 +27,33 @@ class BizQcMaterial(Base):
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizQcMaterialMonthTemplate(Base):
__tablename__ = "biz_qc_material_month_template"
id = Column(String(64), primary_key=True, comment="主键ID")
material_id = Column(String(64), nullable=True, comment="关联物料ID")
material_code = Column(String(64), nullable=False, comment="物料编码")
material_name = Column(String(200), nullable=False, comment="物料名称")
spec_model = Column(String(200), nullable=True, comment="规格型号")
unit = Column(String(32), nullable=True, comment="单位")
catalog_no = Column(String(128), nullable=False, comment="货号")
batch_no = Column(String(128), nullable=False, comment="批号")
manufacturer = Column(String(200), nullable=False, comment="厂家")
unit_price = Column(Numeric(18, 2), nullable=False, comment="单价(元)")
amount = Column(Numeric(18, 2), nullable=False, comment="金额(元)")
in_qty = Column(Numeric(18, 4), nullable=False, comment="默认入库数量")
expire_date = Column(Date, nullable=False, comment="默认过期日期")
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人id")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人id")
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizQcMaterialStockBatch(Base):
__tablename__ = "biz_qc_material_stock_batch"