|
|
@@ -348,6 +348,9 @@ class PlPlanProduct(Base):
|
|
|
product_id = Column(String(64), nullable=False, comment="产品ID")
|
|
|
product_no = Column(String(50), nullable=False, comment="产品编号")
|
|
|
product_name = Column(String(200), nullable=False, comment="产品名称")
|
|
|
+ brand_mode = Column(String(20), nullable=True, comment="required/any")
|
|
|
+ brand_id = Column(String(64), nullable=True, comment="指定品牌ID")
|
|
|
+ brand_name = Column(String(100), nullable=True, comment="品牌名快照")
|
|
|
model = Column(String(100), nullable=True, comment="规格型号")
|
|
|
unit = Column(String(20), nullable=False, default="吨", comment="单位")
|
|
|
category_name = Column(String(200), nullable=True, comment="产品分类")
|
|
|
@@ -392,6 +395,28 @@ class PlPlanProduct(Base):
|
|
|
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记:0-正常 1-已删除")
|
|
|
|
|
|
|
|
|
+class PlPlanProductBrandQty(Base):
|
|
|
+ """计划产品归档品牌数量 pl_plan_product_brand_qty"""
|
|
|
+
|
|
|
+ __tablename__ = "pl_plan_product_brand_qty"
|
|
|
+
|
|
|
+ id = Column(String(64), primary_key=True, comment="主键ID")
|
|
|
+ plan_id = Column(String(64), nullable=False, comment="计划ID")
|
|
|
+ plan_product_id = Column(String(64), nullable=False, comment="计划产品明细ID")
|
|
|
+ brand_id = Column(String(64), nullable=False, default="", comment="品牌ID,空串=无品牌键")
|
|
|
+ brand_name = Column(String(100), nullable=True, comment="品牌名称")
|
|
|
+ qty = Column(DECIMAL(15, 3), nullable=False, default=0, comment="本品牌归档实际数量")
|
|
|
+ tenant_no = Column(String(64), nullable=False, default="shanxia2.0", 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="删除标记:0-正常 1-已删除")
|
|
|
+
|
|
|
+
|
|
|
class PlPlanChange(Base):
|
|
|
"""计划变更记录表 pl_plan_change"""
|
|
|
|
|
|
@@ -810,6 +835,8 @@ class PlInventory(Base):
|
|
|
|
|
|
id = Column(String(64), primary_key=True, comment="主键ID")
|
|
|
product_id = Column(String(64), nullable=False, comment="产品ID")
|
|
|
+ brand_id = Column(String(64), nullable=False, default="", comment="品牌ID,无品牌为空串")
|
|
|
+ brand_name = Column(String(100), nullable=True, comment="品牌名称")
|
|
|
product_no = Column(String(50), nullable=False, comment="产品编号")
|
|
|
product_name = Column(String(200), nullable=False, comment="产品名称")
|
|
|
model = Column(String(100), nullable=True, comment="规格型号")
|
|
|
@@ -842,6 +869,8 @@ class PlInventoryTransaction(Base):
|
|
|
|
|
|
id = Column(String(64), primary_key=True, comment="主键ID")
|
|
|
product_id = Column(String(64), nullable=False, comment="产品ID")
|
|
|
+ brand_id = Column(String(64), nullable=False, default="", comment="品牌ID,无品牌为空串")
|
|
|
+ brand_name = Column(String(100), nullable=True, comment="品牌名称")
|
|
|
product_name = Column(String(200), nullable=False, comment="产品名称")
|
|
|
transaction_type = Column(String(20), nullable=False, comment="事务类型 inbound-入库 outbound-出库")
|
|
|
plan_id = Column(String(64), nullable=True, comment="计划ID")
|
|
|
@@ -871,6 +900,8 @@ class PlInventoryWarning(Base):
|
|
|
|
|
|
id = Column(String(64), primary_key=True, comment="主键ID")
|
|
|
product_id = Column(String(64), nullable=False, comment="产品ID")
|
|
|
+ brand_id = Column(String(64), nullable=False, default="", comment="品牌ID,无品牌为空串")
|
|
|
+ brand_name = Column(String(100), nullable=True, comment="品牌名称")
|
|
|
product_name = Column(String(200), nullable=False, comment="产品名称")
|
|
|
warning_type = Column(String(20), nullable=False, comment="预警类型 low-低于最低 high-高于最高")
|
|
|
current_qty = Column(DECIMAL(15, 3), nullable=False, comment="当前库存")
|