28 lines
860 B
Go
28 lines
860 B
Go
package dao
|
|
|
|
const CartTypeStore = 1
|
|
const CartTypeSale = 2
|
|
const CartTypeUser = 3
|
|
|
|
type Cart struct {
|
|
Id int64 `json:"id" gorm:"id"`
|
|
Content string `json:"content" gorm:"content"` // 内容
|
|
StoreId int64 `json:"store_id" gorm:"store_id"` // 门店ID
|
|
SaleId int64 `json:"sale_id" gorm:"sale_id"` // 销售ID
|
|
Type int8 `json:"type" gorm:"type"` // 类型,1为门店添加,2为销售添加
|
|
UserId int64 `json:"user_id" gorm:"user_id"` // 用户ID
|
|
}
|
|
|
|
type CartInfo struct {
|
|
Content string `json:"content" gorm:"content"` // 内容
|
|
}
|
|
|
|
type ProductInfo struct {
|
|
Id int64 `json:"id" gorm:"id"`
|
|
Price float64 `json:"price" gorm:"price"`
|
|
Number int `json:"number" gorm:"number"`
|
|
Name string `json:"name" gorm:"name"`
|
|
Images string `json:"images" gorm:"images"`
|
|
Stock int `json:"stock" gorm:"stock"`
|
|
}
|