You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
908 B
25 lines
908 B
package shopping_trolley
|
|
|
|
import (
|
|
"github.com/golangkit/formatime"
|
|
"recook/internal/model/goods"
|
|
)
|
|
|
|
type Information struct {
|
|
ID uint `gorm:"column:id;primary_key" json:"id"`
|
|
UserID uint `gorm:"column:user_id" json:"-"`
|
|
BrandID uint `gorm:"column:brand_id" json:"-"`
|
|
Brand goods.Brand `gorm:"foreignKey:BrandID"`
|
|
GoodsID uint `gorm:"column:goods_id" json:"goodsId"`
|
|
Goods goods.Information `gorm:"foreignKey:GoodsID"`
|
|
SkuID uint `gorm:"column:sku_id" json:"skuId"`
|
|
Sku goods.Sku `gorm:"foreignKey:SkuID"`
|
|
Quantity uint `gorm:"column:quantity" json:"quantity"`
|
|
CreatedAt formatime.Second `gorm:"column:created_at" json:"-"`
|
|
}
|
|
|
|
// TableName sets the insert table name for this struct type
|
|
func (*Information) TableName() string {
|
|
return "recook_shopping_trolley_info"
|
|
}
|