Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Consts = map[string]reflect.Value{}
View Source
var Functions = map[string]reflect.Value{}
View Source
var Types = map[string]reflect.Type{ "Department": reflect.TypeOf((*Department)(nil)).Elem(), "Dict": reflect.TypeOf((*Dict)(nil)).Elem(), "DictData": reflect.TypeOf((*DictData)(nil)).Elem(), "DictDataArray": reflect.TypeOf((*DictDataArray)(nil)).Elem(), "Message": reflect.TypeOf((*Message)(nil)).Elem(), "MessageSend": reflect.TypeOf((*MessageSend)(nil)).Elem(), "Permission": reflect.TypeOf((*Permission)(nil)).Elem(), "Role": reflect.TypeOf((*Role)(nil)).Elem(), "Setting": reflect.TypeOf((*Setting)(nil)).Elem(), "Task": reflect.TypeOf((*Task)(nil)).Elem(), "User": reflect.TypeOf((*User)(nil)).Elem(), "WxUser": reflect.TypeOf((*WxUser)(nil)).Elem(), }
View Source
var Variables = map[string]reflect.Value{}
Functions ¶
This section is empty.
Types ¶
type Department ¶
type Department struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` ParentId uuid.UUID `gorm:"size:36;index" json:"parentId"` Parent *Department `gorm:"foreignKey:ParentId;references:Id;constraint:OnUpdate:SET NULL,OnDelete:SET NULL" json:"-"` Users []*User `gorm:"foreignKey:DepartmentId" json:"users,omitempty"` Status int `gorm:"default:0" json:"status"` IsParent bool `gorm:"default:0;comment:'是否为父节点(含子节点) 默认false'" json:"isParent"` Title string `gorm:"size:100" json:"title"` SortOrder float32 `gorm:"type:decimal(10,2)" json:"sortOrder"` }
func (Department) TableName ¶
func (Department) TableName() string
type Dict ¶
type Dict struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` Data []*DictData `gorm:"foreignKey:DictId" json:"-"` Title string `gorm:"size:100" json:"title"` Type string `gorm:"size:100" json:"type"` SortOrder float32 `gorm:"type:decimal(10,2)" json:"sortOrder"` Description string `gorm:"size:1000" json:"description"` }
type DictData ¶
type DictData struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` DictId uuid.UUID `gorm:"size:36;index" json:"dictId"` Dict *Dict `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE" json:"-"` Status int `json:"status"` Title string `gorm:"size:255" json:"title"` Value string `gorm:"size:255" json:"value"` SortOrder float32 `gorm:"type:decimal(10,2)" json:"sortOrder"` Description string `gorm:"size:1000" json:"description"` }
type DictDataArray ¶
type DictDataArray []*DictData
func (DictDataArray) Len ¶
func (p DictDataArray) Len() int
func (DictDataArray) Less ¶
func (p DictDataArray) Less(i, j int) bool
func (DictDataArray) Swap ¶
func (p DictDataArray) Swap(i, j int)
type Message ¶
type Message struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` Title string `gorm:"size:100" json:"title"` Content string `gorm:"size:1000" json:"content"` MessageType int `gorm:"comment:'0:通知 1:私信 2:消息'" json:"messageType"` Range int `gorm:"comment:'0:全体 1:指定用户'" json:"range"` UserIds []uuid.UUID `gorm:"-" json:"userIds"` SenderId uuid.UUID `gorm:"size:36" json:"senderId"` SenderNickName string `gorm:"size:100" json:"senderNickName"` SendTime time.Time `json:"sendTime"` CreateTime time.Time `json:"createTime"` }
type MessageSend ¶
type MessageSend struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` MessageId uuid.UUID `gorm:"size:36" json:"messageId"` Status int `gorm:"comment:'0:未读 1:已读 2:回收站'" json:"status"` Message *Message `gorm:"foreignKey:MessageId" json:"message"` ReceiverId uuid.UUID `gorm:"size:36" json:"receiverId"` ReceiverNickName string `gorm:"size:100" json:"receiverNickName"` ReadTime time.Time `json:"readTime"` CreateTime time.Time `json:"createTime"` }
func (MessageSend) TableName ¶
func (MessageSend) TableName() string
type Permission ¶
type Permission struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` ParentId uuid.UUID `gorm:"size:36" json:"parentId"` Status int `gorm:"default:0;comment:'是否启用 0启用 -1禁用'" json:"status"` Name string `gorm:"size:100" json:"name"` ShowAlways bool `json:"showAlways"` Level int `gorm:"default:0" json:"level"` Type int `gorm:"default:0;comment:'类型 -1顶部菜单 0页面 1具体操作'" json:"type"` Title string `gorm:"size:100" json:"title"` Path string `gorm:"size:500" json:"path"` URL string `gorm:"size:500" json:"url"` Component string `gorm:"size:100" json:"component"` Icon string `gorm:"size:100" json:"icon"` ButtonType string `gorm:"size:100" json:"buttonType"` Description string `gorm:"size:1000" json:"description"` SortOrder float32 `gorm:"type:decimal(10,2)" json:"sortOrder"` Children []*Permission `gorm:"foreignKey:ParentId;associationForeignKey:Id;constraint:OnUpdate:CASCADE,OnDelete:CASCADE" json:"children,omitempty"` PermTypes []string `gorm:"-" json:"permTypes,omitempty"` Expand bool `gorm:"-" json:"expand"` Checked bool `gorm:"-" json:"checked"` Selected bool `gorm:"-" json:"selected"` }
func (Permission) TableName ¶
func (Permission) TableName() string
type Role ¶
type Role struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` Name string `gorm:"size:100;comment:'角色名 以ROLE_开头'" json:"name"` DefaultRole bool `gorm:"default:0;comment:'是否为注册默认角色'" json:"defaultRole"` DataType int `` /* 128-byte string literal not displayed */ Description string `gorm:"size:100" json:"description"` Permissions []*Permission `gorm:"many2many:t_role_permissions;associationAutocCeate:false;associationAutoUpdate:false;" json:"-"` Departments []*Department `gorm:"many2many:t_role_departments;associationAutocReate:false;associationAutoUpdate:false;" json:"-"` }
type Setting ¶
type Task ¶
type Task struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` FuncName string `gorm:"size:100;comment:'任务方法名称'" json:"funcName"` Success bool `gorm:"default:0;comment:'是否执行成功'" json:"success"` Result string `gorm:"type:text" json:"result"` CreatorId uuid.UUID `gorm:"size:36;comment:'创建者Id'" json:"creatorId"` CreateTime time.Time `gorm:"size:100" json:"createTime"` LastRunTime time.Time `gorm:"size:100" json:"lastRunTime"` }
type User ¶
type User struct { model.DBModel Id uuid.UUID `gorm:"size:36;primaryKey" json:"id"` DepartmentId uuid.UUID `gorm:"size:36;index" json:"departmentId"` Department *Department `gorm:"foreignKey:DepartmentId" json:"department,omitempty"` Roles []*Role `gorm:"many2many:t_user_roles;associationAutoCreate:false;associationAutoUpdate:false" json:"roles,omitempty"` Permissions []*Permission `gorm:"-" json:"permissions,omitempty"` Status int `gorm:"default:0;comment:'状态 默认0正常 -1拉黑'" json:"status"` //Type int `gorm:"default:0;comment:'用户类型 0普通用户 1管理员'" json:"type"` UserName string `gorm:"size:100;unique" json:"userName"` Password string `gorm:"size:100" json:"password"` PassStrength int `gorm:"default:0;comment:'密码强度'" json:"passStrength"` NickName string `gorm:"size:100" json:"nickName"` Avatar string `gorm:"size:500" json:"avatar"` Sex string `gorm:"size:10" json:"sex"` Mobile string `gorm:"size:20" json:"mobile"` WeiXin string `gorm:"size:100" json:"weixin"` QQ string `gorm:"size:20" json:"qq"` EMail string `gorm:"size:100" json:"email"` Address string `gorm:"size:500" json:"address"` Street string `gorm:"size:500" json:"street"` Description string `gorm:"size:100" json:"description"` CreateTime time.Time `gorm:"size:100" json:"createTime"` }
Click to show internal directories.
Click to hide internal directories.