package models // ShippingOrder 发货单主表 type ShippingOrder struct { ID int64 `json:"id" gorm:"primarykey;comment:主键ID"` ShippingNo string `json:"shipping_no" gorm:"size:64;not null;default:'';uniqueIndex;comment:发货单号"` CustomerID int64 `json:"customer_id" gorm:"not null;default:0;index;comment:客户ID"` Status int8 `json:"status" gorm:"not null;default:1;index;comment:状态:1=待发货 2=已发货 3=已签收 4=已取消"` ShippingTime *int64 `json:"shipping_time" gorm:"type:bigint;comment:发货时间(时间戳秒)"` ExpectedArriveTime *int64 `json:"expected_arrive_time" gorm:"type:bigint;comment:预计到达时间(时间戳秒)"` ActualArriveTime *int64 `json:"actual_arrive_time" gorm:"type:bigint;comment:实际签收时间(时间戳秒)"` Operator string `json:"operator" gorm:"size:50;comment:操作人"` CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:创建时间(时间戳秒)"` UpdatedAt *int64 `json:"updated_at" gorm:"type:bigint;comment:更新时间(时间戳秒)"` IsDel int8 `json:"is_del" gorm:"type:tinyint(1);not null;default:0;comment:逻辑删除标记(0:未删除,1:已删除)"` Remark string `json:"remark" gorm:"size:500;comment:备注"` } func (ShippingOrder) TableName() string { return "shipping_order" } func (ShippingOrder) TableOptions() string { return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发货单主表'" }