26 lines
829 B
Go
26 lines
829 B
Go
package models
|
||
|
||
import (
|
||
"platform/web/core"
|
||
)
|
||
|
||
// Product 产品表
|
||
type Product struct {
|
||
core.Model
|
||
Code string `json:"code" gorm:"column:code"` // 产品代码
|
||
Name string `json:"name" gorm:"column:name"` // 产品名称
|
||
Description *string `json:"description,omitempty" gorm:"column:description"` // 产品描述
|
||
Sort int32 `json:"sort" gorm:"column:sort"` // 排序
|
||
Status ProductStatus `json:"status" gorm:"column:status"` // 产品状态:0-禁用,1-正常
|
||
|
||
Skus []ProductSku `json:"skus"`
|
||
}
|
||
|
||
// ProductStatus 产品状态枚举
|
||
type ProductStatus int
|
||
|
||
const (
|
||
ProductStatusDisabled ProductStatus = 0 // 禁用
|
||
ProductStatusEnabled ProductStatus = 1 // 正常
|
||
)
|