feat: 完善平台总后台模块
This commit is contained in:
15
backend/api/internal/models/ec_cart.go
Normal file
15
backend/api/internal/models/ec_cart.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import "git.apinb.com/bsm-sdk/core/database"
|
||||
|
||||
// EcCart 对应 ec_cart,保存用户购物车明细。
|
||||
type EcCart struct {
|
||||
Entity
|
||||
UserAccountID uint64 `gorm:"column:user_account_id;not null;index" json:"user_account_id"`
|
||||
EcProductID uint64 `gorm:"column:ec_product_id;not null;index" json:"ec_product_id"`
|
||||
Quantity int `gorm:"column:quantity;not null;default:1" json:"quantity"`
|
||||
Selected bool `gorm:"column:selected;not null;default:true" json:"selected"`
|
||||
}
|
||||
|
||||
func init() { database.AppendMigrate(&EcCart{}) }
|
||||
func (table *EcCart) TableName() string { return "ec_cart" }
|
||||
Reference in New Issue
Block a user