Documentation
¶
Index ¶
- Variables
- func OptionsToMap(sysEnvs []Option) map[string]interface{}
- type InviteCode
- type Option
- type Organization
- type OrganizationMember
- type OrganizationUser
- type Role
- type RoleMember
- type RoleUser
- type SocialUser
- type SysOption
- type SysOptions
- type User
- type UserBase
- type UserOption
- type UserOptions
- type UserWithOrganization
Constants ¶
This section is empty.
Variables ¶
View Source
var StandardSysOption = map[string]interface{}{
"": "",
}
Functions ¶
func OptionsToMap ¶
Types ¶
type InviteCode ¶
type InviteCode struct {
domain.Entity
InviteCode string `gorm:"column:invite_code" json:"inviteCode"`
UserId string `gorm:"column:user_id" json:"userId"`
Channel string `gorm:"column:channel" json:"channel"`
ExpireTime *time.Time `gorm:"column:expire_time" json:"expireTime,omitempty"`
InviteLimit int64 `gorm:"column:invite_limit" json:"inviteLimit"`
InvitedLimit int64 `gorm:"column:invited_limit" json:"invitedLimit"`
}
func (*InviteCode) IsExpired ¶
func (c *InviteCode) IsExpired() bool
func (*InviteCode) TableName ¶
func (*InviteCode) TableName() string
type Organization ¶
type Organization struct {
domain.Model
Fid int64 `json:"fid" fid:"Id"`
Name string `json:"name"`
Status string `json:"status"`
PathInfo string `json:"pathInfo"`
Remark string `json:"remark,omitempty"`
Leaf bool `gorm:"->" json:"leaf"` // 是否为叶子节点
Expand bool `gorm:"->" json:"expand"`
NodeType string `gorm:"->" json:"nodeType"`
Children []Organization `gorm:"-" json:"children,omitempty"`
}
func (*Organization) TableName ¶
func (*Organization) TableName() string
type OrganizationMember ¶
type OrganizationMember struct {
OrganizationUser
Name string `gorm:"->" json:"name,omitempty"`
Login string `gorm:"->" json:"login,omitempty"`
Mobile string `gorm:"->" json:"mobile,omitempty"`
Email string `gorm:"->" json:"email,omitempty"`
Title string `gorm:"->" json:"title,omitempty"`
OrganizationName string `gorm:"->" json:"organizationName,omitempty"`
PositionName string `gorm:"->" json:"positionName,omitempty"`
}
定义不同的查询结果返回的数据结构体
type OrganizationUser ¶
type OrganizationUser struct {
domain.Relation
OrganizationId int64 `gorm:"column:organization_id" json:"organizationId"`
UserId string `gorm:"column:user_id" json:"userId"`
PositionId *int64 `gorm:"column:position_id" json:"positionId"`
Status int `gorm:"column:status;default:1" json:"status"`
Remark string `json:"remark,omitempty"`
}
type RoleMember ¶
type RoleMember struct {
RoleUser
Name string `json:"name,omitempty"`
Login string `json:"login,omitempty"`
Mobile string `json:"mobile,omitempty"`
Email string `json:"email,omitempty"`
RoleName string `json:"roleName,omitempty"`
}
定义不同的查询结果返回的数据结构体
type RoleUser ¶
type SocialUser ¶
type SocialUser struct {
domain.Entity
social.SocialUser
Roles []Role `gorm:"-" json:"roles,omitempty"`
}
func (*SocialUser) SetSocialId ¶
func (u *SocialUser) SetSocialId(socialType string, socialId string) *SocialUser
func (*SocialUser) TableName ¶
func (u *SocialUser) TableName() string
type SysOption ¶
type SysOption struct {
Option
Public bool `gorm:"column:public" json:"public"`
CreatedTime time.Time `gorm:"column:created_time;autoCreateTime" json:"createdTime"`
CreatedBy string `gorm:"column:created_by" json:"createdBy"`
LastModifiedTime time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"`
LastModifiedBy string `gorm:"column:last_modified_by" json:"lastModifiedBy"`
TenantId string `gorm:"column:tenant_id" json:"tenantId"`
}
type SysOptions ¶
type User ¶
type User struct {
UserBase
Password string `gorm:"column:password" json:"-"`
Admin bool `gorm:"column:admin" json:"admin"`
InviteCode string `gorm:"-" json:"inviteCode,omitempty"`
Roles []Role `gorm:"many2many:sys_role_user;" json:"roles,omitempty"`
}
func (*User) SetPassword ¶
type UserBase ¶
type UserBase struct {
domain.Entity
DelFlag bool `gorm:"column:del_flag" json:"del_flag"`
Login *string `gorm:"column:login" json:"login,omitempty"`
Mobile *string `gorm:"column:mobile" json:"mobile,omitempty"`
Email *string `gorm:"column:email" json:"email,omitempty"`
Name *string `gorm:"column:name" json:"name,omitempty"`
Status *int `gorm:"column:status" json:"status"`
Avatar *string `gorm:"column:avatar" json:"avatar,omitempty"`
Remark *string `gorm:"column:remark" json:"remark,omitempty"`
InviterId *string `gorm:"column:inviter_id" json:"inviterId,omitempty"`
LoginTimes int `gorm:"column:login_times" json:"loginTimes"`
LastLoginTime *time.Time `gorm:"column:last_login_time" json:"lastLoginTime,omitempty"`
LastLoginIp *string `gorm:"column:last_login_ip" json:"lastLoginIp,omitempty"`
}
type UserOption ¶
func (*UserOption) TableName ¶
func (*UserOption) TableName() string
type UserOptions ¶
type UserOptions struct {
UserId string
Options map[string]UserOption
}
type UserWithOrganization ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.