You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.7 KiB

6 months ago
package model
import "bkb-seller/global"
const (
ReleaseCountryCode = "release_country"
ReleaseChannelCode = "release_channel"
)
type SysDictType struct { //数据字典分类
global.BASE_ID
PID int `gorm:"" json:"pid"` //父ID
Code string `gorm:"UNIQUE;size:20" json:"code"` //编码
Name string `gorm:"size:20" json:"name"` //名称
Type string `gorm:"size:10" json:"type"` //类型
Status string `gorm:"size:1" json:"status"` //可用状态 1正常 0删除
Desc string `gorm:"size:30" json:"desc"` //描述
IsFixed int `gorm:"type:tinyint(1)" json:"isFixed"` //0默认为不固定 1固定
//DynamicField string `gorm:"type:varchar(255)" json:"dynamic_field"` //动态字段编码
global.TIME_MODEL
}
type SysDictData struct { //数据字典取值
global.BASE_ID
TypeCode string `gorm:"size:20" json:"typeCode"` //编码
Sort int `gorm:"" json:"sort"` //排序
Label string `gorm:"size:30" json:"label"` //标签
Value string `gorm:"size:10" json:"value"` //值
IsDefault int `gorm:"type:tinyint(1)" json:"isDefault"` //是否为默认值 1是 0否
Desc string `gorm:"size:50" json:"desc"` //描述
Status string `gorm:"size:1" json:"status"` //可用状态 1正常 0删除
global.TIME_MODEL
}
type SysDictDataView struct {
Label string `json:"label"` //标签
Value string `json:"value"` //值
IsDefault int `json:"isDefault"` //是否为默认值 1是 0否
}
func (SysDictType) TableName() string {
return "sys_dict_type"
}
func (SysDictData) TableName() string {
return "sys_dict_data"
}