|
|
@@ -18,19 +18,20 @@ const (
|
|
|
)
|
|
|
|
|
|
type Cart struct {
|
|
|
- Id int64 `orm:"column(id);pk" json:"id"` // int(11)
|
|
|
- ProductId int64 `orm:"column(product_id)" json:"product_id"` // int(11)
|
|
|
- UserId int64 `orm:"column(user_id)" json:"user_id"` // varchar(64)
|
|
|
- WxUserId int64 `orm:"column(wx_user_id)" json:"wx_user_id"`
|
|
|
- CreatedAt time.Time `orm:"column(created_at);null;auto_now_add;type(datetime)" json:"-"` // datetime
|
|
|
- Count int64 `orm:"column(nums)" json:"count"` // int(11)
|
|
|
- IsBuy bool `orm:"column(is_buy)" json:"is_under_seckill"`
|
|
|
- ProductName string `orm:"-" json:"product_name"` // decimal(10,2)
|
|
|
- SizeName string `orm:"-" json:"size_name"` // varchar(64)
|
|
|
- ColorName string `orm:"-" json:"color_name"` // varchar(64)
|
|
|
- Cover string `orm:"-" json:"cover"` // decimal(10,2)
|
|
|
- OriginalPrice int64 `orm:"-" json:"original_price"` // decimal(10,2)
|
|
|
- Attrs string `orm:"-" json:"attrs"` // decimal(10,2)
|
|
|
+ Id int64 `orm:"column(id);pk" json:"id"` // int(11)
|
|
|
+ ProductId int64 `orm:"column(product_id)" json:"product_id"` // int(11)
|
|
|
+ UserId int64 `orm:"column(user_id)" json:"user_id"` // varchar(64)
|
|
|
+ WxUserId int64 `orm:"column(wx_user_id)" json:"wx_user_id"`
|
|
|
+ CreatedAt time.Time `orm:"column(created_at);null;auto_now_add;type(datetime)" json:"-"` // datetime
|
|
|
+ Count int64 `orm:"column(nums)" json:"count"` // int(11)
|
|
|
+ IsBuy bool `orm:"column(is_buy)" json:"is_under_seckill"`
|
|
|
+ ProductName string `orm:"-" json:"product_name"` // decimal(10,2)
|
|
|
+ SizeName string `orm:"-" json:"size_name"` // varchar(64)
|
|
|
+ ColorName string `orm:"-" json:"color_name"` // varchar(64)
|
|
|
+ Cover string `orm:"-" json:"cover"` // decimal(10,2)
|
|
|
+ OriginalPrice int64 `orm:"-" json:"original_price"` // decimal(10,2)
|
|
|
+ Attrs string `orm:"-" json:"attrs"` // decimal(10,2)
|
|
|
+ PackageList []*ProductItem `orm:"-" json:"product_list"` // varchar(255)
|
|
|
}
|
|
|
|
|
|
func (self *Cart) TableName() string {
|