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.
24 lines
872 B
24 lines
872 B
2 years ago
|
package model
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
type ShoppingCart struct {
|
||
|
//gorm.Model
|
||
|
ID int32 `json:"id"`
|
||
|
UserId int32 `gorm:"default:1" json:"userId"`
|
||
|
ProductId int32 `gorm:"product_id" json:"productId"`
|
||
|
ProductSkuId int32 `gorm:"product_sku_id" json:"productSkuId"`
|
||
|
ProductName string `json:"productName"`
|
||
|
ProductMainPicture string `gorm:"product_main_picture" json:"productMainPicture"`
|
||
|
Number int32 `gorm:"default:1" json:"shoppingCartNumber"`
|
||
|
CreateUser int32 `gorm:"default:1" json:"createUser"`
|
||
|
CreateTime time.Time `json:"createTime"`
|
||
|
UpdateUser int32 `json:"updateUser"`
|
||
|
UpdateTime time.Time `json:"updateTime"`
|
||
|
IsDeleted bool `json:"isDeleted"`
|
||
|
}
|
||
|
|
||
|
func (table *ShoppingCart) TableName() string {
|
||
|
return "shopping_cart"
|
||
|
}
|