package models // OutboundOrderItem 出库单明细表 type OutboundOrderItem struct { ID int64 `json:"id" gorm:"primarykey;comment:明细ID"` OutOrderID int64 `json:"out_order_id" gorm:"not null;default:0;index;comment:出库单ID"` SalesOrderID int64 `json:"sales_order_id" gorm:"not null;default:0;index;comment:销售单ID"` ProductID int64 `json:"product_id" gorm:"not null;default:0;index;comment:商品ID"` LocationID int64 `json:"location_id" gorm:"not null;default:0;comment:库位ID"` BatchNo string `json:"batch_no" gorm:"size:100;not null;default:'';comment:批次号"` ProductionDate int64 `json:"production_date" gorm:"not null;default:0;comment:生产日期时间戳(秒)"` ExpiryDate int64 `json:"expiry_date" gorm:"not null;default:0;comment:失效日期时间戳(秒)"` Quantity int64 `json:"quantity" gorm:"not null;default:0;comment:出库数量"` UnitPrice int64 `json:"unit_price" gorm:"not null;default:0;comment:单价(分/基本单位)"` CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:创建时间戳(秒)"` UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;not null;default:0;comment:更新时间戳(秒)"` IsDel int8 `json:"is_del" gorm:"type:tinyint(1);not null;default:0;comment:逻辑删除标记(0:未删除,1:已删除)"` } func (OutboundOrderItem) TableName() string { return "outbound_order_item" } func (OutboundOrderItem) TableOptions() string { return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='出库单明细表'" }