package models // ShippingOrderItem 发货单明细表 type ShippingOrderItem struct { ID int64 `json:"id" gorm:"primarykey;comment:主键ID"` ShippingOrderID int64 `json:"shipping_order_id" gorm:"not null;default:0;index;comment:关联发货单ID"` OutboundOrderItemID *int64 `json:"outbound_order_item_id" gorm:"comment:关联出库单明细ID"` Quantity int64 `json:"quantity" gorm:"not null;default:1;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 (ShippingOrderItem) TableName() string { return "shipping_order_item" } func (ShippingOrderItem) TableOptions() string { return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发货单明细表'" }