数据:增加测试批次模型与迁移契约
This commit is contained in:
@@ -22,6 +22,13 @@ class BizInboundOrder(Base):
|
||||
)
|
||||
|
||||
inbound_id = Column(BigInteger, primary_key=True, nullable=False, autoincrement=True, comment='入库单ID')
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
inbound_no = Column(String(64), nullable=False, unique=True, comment='入库单号')
|
||||
warehouse_id = Column(
|
||||
BigInteger,
|
||||
@@ -62,6 +69,13 @@ class BizInboundItem(Base):
|
||||
autoincrement=True,
|
||||
comment='入库明细ID',
|
||||
)
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
inbound_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_inbound_order.inbound_id'),
|
||||
@@ -93,6 +107,13 @@ class BizFillingRecord(Base):
|
||||
)
|
||||
|
||||
filling_id = Column(BigInteger, primary_key=True, nullable=False, autoincrement=True, comment='装填记录ID')
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
filling_no = Column(String(64), nullable=False, unique=True, comment='装填单号')
|
||||
pallet_id = Column(BigInteger, ForeignKey('biz_pallet.pallet_id'), nullable=False, comment='托盘ID')
|
||||
warehouse_id = Column(
|
||||
@@ -141,6 +162,13 @@ class BizShipmentOrder(Base):
|
||||
)
|
||||
|
||||
shipment_id = Column(BigInteger, primary_key=True, nullable=False, autoincrement=True, comment='发货单ID')
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
shipment_no = Column(String(64), nullable=False, unique=True, comment='发货单号')
|
||||
source_warehouse_id = Column(
|
||||
BigInteger,
|
||||
@@ -191,6 +219,13 @@ class BizShipmentItem(Base):
|
||||
autoincrement=True,
|
||||
comment='发货明细ID',
|
||||
)
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
shipment_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_shipment_order.shipment_id'),
|
||||
@@ -224,6 +259,13 @@ class BizUsageRecord(Base):
|
||||
)
|
||||
|
||||
usage_id = Column(BigInteger, primary_key=True, nullable=False, autoincrement=True, comment='使用记录ID')
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
usage_no = Column(String(64), nullable=False, unique=True, comment='使用记录号')
|
||||
pallet_id = Column(BigInteger, ForeignKey('biz_pallet.pallet_id'), nullable=False, comment='托盘ID')
|
||||
active_filling_id = Column(
|
||||
@@ -264,6 +306,13 @@ class BizReturnOrder(Base):
|
||||
)
|
||||
|
||||
return_id = Column(BigInteger, primary_key=True, nullable=False, autoincrement=True, comment='退回单ID')
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
return_no = Column(String(64), nullable=False, unique=True, comment='退回单号')
|
||||
source_site_id = Column(
|
||||
BigInteger,
|
||||
@@ -318,6 +367,13 @@ class BizReturnItem(Base):
|
||||
autoincrement=True,
|
||||
comment='退回明细ID',
|
||||
)
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
return_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_return_order.return_id'),
|
||||
@@ -363,6 +419,13 @@ class BizPalletInventory(Base):
|
||||
autoincrement=False,
|
||||
comment='托盘ID',
|
||||
)
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
active_filling_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_filling_record.filling_id'),
|
||||
@@ -415,6 +478,13 @@ class BizPalletEvent(Base):
|
||||
)
|
||||
|
||||
event_id = Column(BigInteger, primary_key=True, nullable=False, autoincrement=True, comment='事件ID')
|
||||
test_batch_id = Column(
|
||||
BigInteger,
|
||||
ForeignKey('biz_test_batch.batch_id'),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment='测试数据批次ID;NULL表示正式数据',
|
||||
)
|
||||
pallet_id = Column(BigInteger, ForeignKey('biz_pallet.pallet_id'), nullable=False, comment='托盘ID')
|
||||
event_seq = Column(Integer, nullable=False, comment='托盘内事件序号')
|
||||
event_type = Column(String(32), nullable=False, comment='事件类型')
|
||||
|
||||
Reference in New Issue
Block a user