12345678910111213141516171819202122232425262728293031323334353637383940 |
- package models
- type Setting struct {
- Id int `orm:"pk;auto" json:"id"`
- Name string `orm:"size(255)" json:"name"`
- ConfigKey string `orm:"unique;size(255)" json:"configKey"`
- ConfigValue string `orm:"unique;column(dn)" json:"configValue"`
- Description string `orm:"size(255)" json:"description"`
- Remark string `orm:"null;type(text)" json:"remark"`
- Enable bool `orm:"default(false)" json:"enable"`
- }
- func (s *Setting) UniqueClone() (*Setting, string) {
- return &Setting{
- ConfigKey: s.ConfigKey,
- }, "ConfigKey"
- }
- // 前端路由设置,Uid不为0表示个人独有
- type SettingRoute struct {
- Id string `orm:"pk;size(255)" json:"id"`
- Path string `json:"path"`
- Index bool `json:"index"`
- Pid string `json:"pid"`
- Uid int `orm:"default(0)" json:"uid"`
- Roles string `json:"roles"`
- Type string `orm:"size(64)" json:"type"`
- Target string `json:"target"`
- Title string `json:"title"`
- Brief string `json:"brief"`
- NavLink string `json:"navLink"`
- Deleted bool `orm:"default(1)" json:"deleted"`
- SortNum int `orm:"default(0)" json:"sortNum"`
- }
- func (s *SettingRoute) UniqueClone() (*SettingRoute, string) {
- return &SettingRoute{
- Id: s.Id,
- }, "Id"
- }
|