21 lines
633 B
Go
21 lines
633 B
Go
|
package model
|
||
|
|
||
|
// Product
|
||
|
type Product struct {
|
||
|
ID uint `gorm:"primarykey"`
|
||
|
Title string `gorm:"column:title" json:"title"`
|
||
|
Introduction string `gorm:"column:introduction" json:"introduction"`
|
||
|
StockSize uint64 `gorm:"column:stock_size" json:"stockSize"`
|
||
|
SalesVolume uint64 `json:"salesVolume"`
|
||
|
OrderNum uint64 `json:"orderNum"`
|
||
|
NowStockSize uint64 `json:"nowStockSize"`
|
||
|
Uv uint `json:"uv"`
|
||
|
}
|
||
|
|
||
|
// ProductOrder
|
||
|
type ProductOrder struct {
|
||
|
ID uint `gorm:"primarykey"`
|
||
|
ProductID uint `gorm:"column:ProductID" json:"ProductID"`
|
||
|
UserId uint `gorm:"column:UserID" json:"UserID"`
|
||
|
}
|