Documentation ¶
Overview ¶
数据库存储数据
Index ¶
- func GetName(value, group string) string
- func GetValue(name, group string) string
- func GroupNV(group string) (map[string]string, error)
- func GroupVN(group string) (map[string]string, error)
- func Regedit(c *Config)
- func SetDB(db *gorm.DB)
- func SetValue(name, group, value string) error
- type Config
- type DistInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { DB *gorm.DB // 数据库连接 DistTable string // 字典配置表名 // contains filtered or unexported fields }
配置信息
type DistInfo ¶
type DistInfo struct { Id uint `gorm:"column:id;type:int unsigned;primaryKey;autoIncrement;not null" form:"id" json:"id" xml:"id"` Groups string `gorm:"column:groups;type:varchar(100);comment:所属分组" form:"groups" json:"groups" xml:"groups"` // 所属分组 Name string `gorm:"column:name;type:varchar(100);comment:下标名称" form:"name" json:"name" xml:"name"` // 下标名称 Value string `gorm:"column:value;type:varchar(300);comment:存储值" form:"value" json:"value" xml:"value"` // 存储的值 CreatedAt string `gorm:"column:created_at;type:datetime;comment:添加时间" form:"created_at" json:"created_at" xml:"created_at"` // 添加时间 }
字典表结构信息
Click to show internal directories.
Click to hide internal directories.