Documentation
¶
Index ¶
Constants ¶
View Source
const ( RoleTypeSuperAdmin = -1 RoleTypeNormal = 1 RoleTypeProject = 2 )
View Source
const ( RoleDataPermissionAll = 1 RoleDataPermissionDept = 2 RoleDataPermissionDeptAndSub = 3 RoleDataPermissionSelf = 4 )
View Source
const ( RoleStatusNormal = 1 RoleStatusDisable = -1 )
View Source
const ( UserStatusNormal = 1 UserStatusLeaved = -9 )
View Source
const (
ThirdSourceCodeDingtalk = "dingtalk"
)
View Source
const (
ThirdSourceStatusEnabled = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Department ¶
type Department struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
ExternalID string `json:"externalId,omitempty" gorm:"index;size:50;comment:外部ID"`
Name string `json:"name,omitempty" gorm:"size:50;comment:部门名称"`
ParentID uint64 `json:"parentId,omitempty,string" gorm:"index;comment:父级ID"`
FullPath string `json:"fullPath,omitempty" gorm:"size:255;comment:部门路径,/分割"`
ExternalJson string `json:"externalJson,omitempty" gorm:"size:2000;comment:扩展json信息"`
OrderNum int `json:"orderNum,omitempty" gorm:"comment:排序号"`
ChildCount int `json:"childCount,omitempty" gorm:"comment:子部门数量"`
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
UpdateTime int64 `json:"updateTime" gorm:"autoUpdateTime:milli"`
}
func (*Department) TableComment ¶
func (_ *Department) TableComment() string
func (*Department) UnmarshalJSON ¶
func (d *Department) UnmarshalJSON(b []byte) error
type Resource ¶
type Resource struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
ResourceName string `json:"resourceName,omitempty" gorm:"size:50;comment:资源名称"` // 资源名称
ResourceCode string `json:"resourceCode,omitempty" gorm:"size:50;uniqueIndex;comment:资源代码"` // 资源认证代码
Type int `json:"type,omitempty" gorm:"comment:类型 1-通用权限 2-项目专属权限"` // 类型
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
UpdateTime int64 `json:"updateTime" gorm:"autoUpdateTime:milli"`
}
func (*Resource) TableComment ¶
func (*Resource) UnmarshalJSON ¶
type Role ¶
type Role struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
Name string `json:"name,omitempty" gorm:"size:50;comment:角色名称"`
Desc string `json:"desc,omitempty" gorm:"size:200;comment:角色描述"`
Type int `json:"type,omitempty" gorm:"comment:角色类型 1-普通角色 2-项目角色 -1-超级管理员角色"`
DataPermission int `` /* 137-byte string literal not displayed */
Style string `json:"style,omitempty" gorm:"size:500;comment:角色样式"`
DefaultRole int `json:"defaultRole" gorm:"comment:默认角色 1-是 其他否"`
Status int `json:"status,omitempty" gorm:"comment:状态 1-启用 -1-禁用"`
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
UpdateTime int64 `json:"updateTime" gorm:"autoUpdateTime:milli"`
}
func (*Role) TableComment ¶
func (*Role) UnmarshalJSON ¶
type RoleResource ¶
type RoleResource struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
RoleID uint64 `json:"roleId,omitempty,string"`
ResourceCode string `json:"resourceCode,omitempty" gorm:"size:50;comment:资源代码"` // 资源认证代码
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
}
func (*RoleResource) TableComment ¶
func (_ *RoleResource) TableComment() string
func (*RoleResource) UnmarshalJSON ¶
func (rr *RoleResource) UnmarshalJSON(b []byte) error
type ThirdSource ¶
type ThirdSource struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
Name string `json:"name,omitempty" gorm:"size:50;comment:第三方来源名称"` // 第三方来源名称
Code string `json:"code,omitempty" gorm:"size:50;comment:第三方来源代码"` // 第三方来源代码
CorpId string `json:"corpId,omitempty" gorm:"size:50;comment:第三方企业ID"` // 第三方企业ID
Configuration string `json:"configuration,omitempty" gorm:"size:1000;comment:第三方json配置"` // 第三方json配置
MatchConfig string `json:"matchConfig,omitempty" gorm:"size:1000;comment:第三方匹配配置"` // 第三方匹配配置
Status int `json:"status,omitempty" gorm:"comment:状态 1-启用 其他禁用"`
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
}
func (*ThirdSource) TableComment ¶
func (_ *ThirdSource) TableComment() string
func (*ThirdSource) UnmarshalJSON ¶
func (s *ThirdSource) UnmarshalJSON(b []byte) error
type ThirdUser ¶
type ThirdUser struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
SourceID uint64 `json:"sourceId,omitempty,string" gorm:"comment:第三方来源ID"`
UserID uint64 `json:"userId,omitempty,string" gorm:"comment:关联的用户ID"`
SourceCode string `json:"sourceCode,omitempty" gorm:"size:50;comment:第三方来源代码"` // 第三方来源代码
OpenID string `json:"openId,omitempty" gorm:"size:50;comment:第三方openId"` // 第三方openId,即dingtalk的staffId
UnionID string `json:"unionId,omitempty" gorm:"size:50;comment:第三方unionId"` // 第三方unionId
Info string `json:"info,omitempty" gorm:"size:1000;comment:第三方用户json信息"` // 第三方用户信息
Status int `json:"status,omitempty" gorm:"comment:状态 1-正常"`
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
}
func (*ThirdUser) TableComment ¶
func (*ThirdUser) UnmarshalJSON ¶
type User ¶
type User struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
Username string `json:"username,omitempty" gorm:"size:30;index;comment:用户名"`
Password string `json:"password,omitempty" gorm:"size:100;comment:密码"`
RealName string `json:"realName,omitempty" gorm:"size:50;comment:真实姓名"`
Email string `json:"email,omitempty" gorm:"size:50;comment:邮箱"`
Mobile string `json:"mobile,omitempty" gorm:"size:50;comment:手机号"`
Status int `json:"status,omitempty" gorm:"comment:状态 1-正常"`
ExtType int `json:"extType,omitempty" gorm:"comment:扩展类型 -1-无任何扩展类型 1-需要工时填报"`
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
UpdateTime int64 `json:"updateTime" gorm:"autoUpdateTime:milli"`
}
func (*User) TableComment ¶
func (*User) UnmarshalJSON ¶
type UserDepartment ¶
type UserDepartment struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
UserID uint64 `json:"userId,omitempty,string" gorm:"index;comment:用户ID"`
DepartmentID uint64 `json:"departmentId,omitempty,string" gorm:"index;comment:部门ID"`
ExternalJson string `json:"externalJson,omitempty" gorm:"size:2000;comment:扩展json信息"`
DepartmentPath string `json:"departmentPath,omitempty" gorm:"size:255;comment:部门路径,/分割"`
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
UpdateTime int64 `json:"updateTime" gorm:"autoUpdateTime:milli"`
}
func (*UserDepartment) TableComment ¶
func (_ *UserDepartment) TableComment() string
func (*UserDepartment) UnmarshalJSON ¶
func (ud *UserDepartment) UnmarshalJSON(b []byte) error
type UserRole ¶
type UserRole struct {
ID uint64 `json:"id,omitempty,string" gorm:"primaryKey;autoIncrement:false"`
UserID uint64 `json:"userId,omitempty,string"`
RoleID uint64 `json:"roleId,omitempty,string"`
CreateTime int64 `json:"createTime" gorm:"autoCreateTime:milli"`
}
func (*UserRole) TableComment ¶
func (*UserRole) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.