feat: 完善平台总后台模块

This commit is contained in:
2026-07-27 00:18:42 +08:00
parent 073eb89762
commit 642980960e
197 changed files with 22356 additions and 1060 deletions

View File

@@ -0,0 +1,16 @@
package models
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"`
}
func init() { database.AppendMigrate(&EcOrderItem{}) }
func (table *EcOrderItem) TableName() string { return "ec_order_item" }