fix: close platform admin final audit findings

This commit is contained in:
2026-07-27 12:02:08 +08:00
parent 0ba4136e1a
commit 34e8b092b3
70 changed files with 1873 additions and 348 deletions

View File

@@ -4,12 +4,12 @@ import "git.apinb.com/bsm-sdk/core/database"
// EcOrderItem 对应 ec_order_item保存订单商品快照。
type EcOrderItem struct {
Entity
EcOrderID uint64 `gorm:"column:ec_order_id;not null;index" json:"ec_order_id"`
EcProductID uint64 `gorm:"column:ec_product_id;not null;index" json:"ec_product_id"`
ProductSnapshot string `gorm:"column:product_snapshot;type:jsonb;not null;default:'{}'" json:"product_snapshot"`
Quantity int `gorm:"column:quantity;not null;default:1" json:"quantity"`
SaleAmount int64 `gorm:"column:sale_amount;not null;default:0" json:"sale_amount"`
Entity // 公共实体字段
EcOrderID uint64 `gorm:"column:ec_order_id;not null;index" json:"ec_order_id"` // ec_order_id 业务字段
EcProductID uint64 `gorm:"column:ec_product_id;not null;index" json:"ec_product_id"` // ec_product_id 业务字段
ProductSnapshot string `gorm:"column:product_snapshot;type:jsonb;not null;default:'{}'" json:"product_snapshot"` // product_snapshot 业务字段
Quantity int `gorm:"column:quantity;not null;default:1" json:"quantity"` // quantity 业务字段
SaleAmount int64 `gorm:"column:sale_amount;not null;default:0" json:"sale_amount"` // sale_amount 业务字段
}
func init() { database.AppendMigrate(&EcOrderItem{}) }