快照订单号以及退款订单号
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m27s

This commit is contained in:
2026-04-23 17:14:10 +08:00
parent 4bde09837a
commit f177c26016
9 changed files with 94 additions and 4 deletions

View File

@@ -61,6 +61,9 @@ type PackageUsage struct {
gorm.Model
BaseModel `gorm:"embedded"`
OrderID uint `gorm:"column:order_id;index;not null;comment:订单ID" json:"order_id"`
OrderNo string `gorm:"column:order_no;type:varchar(30);not null;default:'';comment:订单号快照(从订单复制)" json:"order_no"`
RefundID *uint `gorm:"column:refund_id;index;comment:退款单ID快照退款后写入" json:"refund_id,omitempty"`
RefundNo string `gorm:"column:refund_no;type:varchar(50);not null;default:'';comment:退款单号快照(退款后写入)" json:"refund_no"`
PackageID uint `gorm:"column:package_id;index;not null;comment:套餐ID" json:"package_id"`
UsageType string `gorm:"column:usage_type;type:varchar(20);not null;comment:使用类型 single_card-单卡套餐 device-设备级套餐" json:"usage_type"`
IotCardID uint `gorm:"column:iot_card_id;index;comment:IoT卡ID(单卡套餐时有值)" json:"iot_card_id"`