Documentation ¶
Overview ¶
数据库配置的读写支持
Index ¶
- func GetBool(name string) bool
- func GetFloat(name string) float64
- func GetInt(name string) int64
- func GetSelect(name string) string
- func GetString(name string) string
- func SetBool(name string, val bool) error
- func SetFloat(name string, val float64) error
- func SetInt(name string, val int64) error
- func SetLongText(name, val string) error
- func SetSelect(name, val string) error
- func SetString(name, val string) error
- func SetText(name, val string) error
- type Config
- type Configure
- type ConfigureUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configure ¶
type Configure struct { Id uint `gorm:"column:id" json:"id" form:"id"` NameKey string `gorm:"column:name_key" json:"name_key" form:"name_key"` //配置项key NameCn string `gorm:"column:name_cn" json:"name_cn" form:"name_cn"` //配置项名称 NameGroup string `gorm:"column:name_group" json:"name_group" form:"name_group"` //配置项组 Types string `gorm:"column:types" json:"types" form:"types"` //配置项类型 Desc string `gorm:"column:desc" json:"desc" form:"desc"` //配置项介绍信息 ValueBool uint8 `gorm:"column:value_bool" json:"value_bool" form:"value_bool"` ValueString string `gorm:"column:value_string" json:"value_string" form:"value_string"` ValueInt int64 `gorm:"column:value_int" json:"value_int" form:"value_int"` ValueFloat float64 `gorm:"column:value_float" json:"value_float" form:"value_float"` EnumSelect string `gorm:"column:enum_select" json:"enum_select" form:"enum_select"` //下拉列表,多项使用,分割key和key_cn使用:分割,下拉选择的值存储在value_string中 CreatedAt string `gorm:"column:created_at" json:"created_at" form:"created_at"` //创建时间 UpdatedAt string `gorm:"column:updated_at" json:"updated_at" form:"updated_at"` //更新时间 }
配置项信息存储表
type ConfigureUser ¶
type ConfigureUser struct { Id uint `gorm:"column:id" json:"id" form:"id"` //用户ID Configure string `gorm:"column:configure" json:"configure" form:"configure"` //配置信息JSON串 }
用户个性化配置项存储表
func (*ConfigureUser) TableName ¶ added in v0.0.6
func (c *ConfigureUser) TableName() string
Click to show internal directories.
Click to hide internal directories.