优化表结构,重构模型,重新实现基于白银网关的提取节点流程
This commit is contained in:
23
web/models/product.go
Normal file
23
web/models/product.go
Normal file
@@ -0,0 +1,23 @@
|
||||
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 // 正常
|
||||
)
|
||||
Reference in New Issue
Block a user