Files
bl/modules/base/model/base_sys_param.go

33 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import "blazing/cool"
const TableNameBaseSysParam = "base_sys_param"
// BaseSysParam mapped from table <base_sys_param>
type BaseSysParam struct {
*cool.Model
KeyName string `gorm:"column:keyName;type:varchar(255);not null;index:IDX_cf19b5e52d8c71caa9c4534454,priority:1" json:"keyName"` // 键位
Name string `gorm:"column:name;type:varchar(255);not null" json:"name"` // 名称
Data string `gorm:"column:data;type:text;not null" json:"data"` // 数据
DataType int32 `gorm:"column:dataType;not null;default:0" json:"dataType"` // 数据类型 0:字符串 1数组 2键值对
Remark *string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
}
// TableName BaseSysParam's table name
func (*BaseSysParam) TableName() string {
return TableNameBaseSysParam
}
// NewBaseSysParam 创建一个新的BaseSysParam
func NewBaseSysParam() *BaseSysParam {
return &BaseSysParam{
Model: cool.NewModel(),
}
}
// init 创建表
func init() {
cool.CreateTable(&BaseSysParam{})
}