feat: add accessory models and box_item item_type column
Add FinishedGoodsAccessory and AccessoryType ORM models for the accessory module. Add item_type column to FinishedGoodsBoxItem to distinguish between products and accessories in boxing records. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,9 @@ class FinishedGoodsBoxItem(Base):
|
||||
box_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
zongpai_no: Mapped[str] = mapped_column(String(64), nullable=False)
|
||||
quantity: Mapped[float | None] = mapped_column(Numeric(18, 3), nullable=True)
|
||||
item_type: Mapped[str] = mapped_column(
|
||||
String(16), nullable=False, default="product", server_default="product"
|
||||
)
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime,
|
||||
nullable=False,
|
||||
|
||||
Reference in New Issue
Block a user