24 lines
745 B
Go
24 lines
745 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" gorm:"column:description"` // 产品描述
|
|||
|
|
Sort int32 `json:"sort" gorm:"column:sort"` // 排序
|
|||
|
|
Status ProductStatus `json:"status" gorm:"column:status"` // 产品状态:0-禁用,1-正常
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// ProductStatus 产品状态枚举
|
|||
|
|
type ProductStatus int
|
|||
|
|
|
|||
|
|
const (
|
|||
|
|
ProductStatusDisabled ProductStatus = 0 // 禁用
|
|||
|
|
ProductStatusEnabled ProductStatus = 1 // 正常
|
|||
|
|
)
|