Documentation ¶
Index ¶
- Variables
- func OptionsToMap(sysEnvs []Option) map[string]interface{}
- type AuditingEntity
- type AuditingModel
- type DeletableEntity
- type DeletableModel
- type Entity
- type InviteCode
- type Model
- type Option
- type Organization
- type OrganizationMember
- type OrganizationUser
- type Relation
- 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 ( STATUS_INVALID int = 0 STATUS_VALID int = 1 STATUS2 int = 2 STATUS3 int = 3 )
View Source
var StandardSysOption = map[string]interface{}{
"": "",
}
Functions ¶
func OptionsToMap ¶
Types ¶
type AuditingEntity ¶
type AuditingModel ¶
type DeletableEntity ¶
type DeletableEntity struct { AuditingEntity DelFlag bool `gorm:"column:del_flag;default:false" json:"delFlag"` DeletedTime time.Time `gorm:"column:deleted_time;autoUpdateTime" json:"deleted_time"` DeletedBy string `gorm:"column:deleted_by" json:"deleted_by"` }
type DeletableModel ¶
type DeletableModel struct { AuditingModel DelFlag bool `gorm:"column:del_flag;default:false" json:"delFlag"` DeletedTime time.Time `gorm:"column:deleted_time;autoUpdateTime" json:"deleted_time"` DeletedBy string `gorm:"column:deleted_by" json:"deleted_by"` }
type Entity ¶
type Entity struct { Id string `gorm:"column:id;primaryKey" json:"id" primaryKey:"yes"` CreatedTime time.Time `gorm:"column:created_time;autoCreateTime" json:"createdTime"` LastModifiedTime time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"` TenantId string `gorm:"column:tenant_id" json:"tenantId"` }
type InviteCode ¶
type InviteCode struct { 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 Model ¶
type Model struct { Id int64 `gorm:"primaryKey" json:"id" primaryKey:"yes"` CreatedTime time.Time `gorm:"column:created_time;autoCreateTime" json:"createdTime"` LastModifiedTime time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"` TenantId string `gorm:"column:tenant_id" json:"tenantId"` }
type Organization ¶
type Organization struct { 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 { 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 { Entity DelFlag bool `gorm:"column:del_flag" json:"delFlag"` Type string `gorm:"column:type" json:"type"` OpenId *string `gorm:"column:open_id" json:"openId,omitempty"` SocialId *string `gorm:"column:social_id" json:"socialId,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;default:1" json:"status"` Avatar *string `gorm:"column:avatar" json:"avatar,omitempty"` LoginTimes int `gorm:"column:login_times" json:"loginTimes"` Remark *string `gorm:"column:remark" json:"remark,omitempty"` LastLoginTime *time.Time `gorm:"column:last_login_time" json:"lastLoginTime,omitempty"` LastLoginIp *string `gorm:"column:last_login_ip" json:"lastLoginIp,omitempty"` NickName *string `gorm:"column:nick_name" json:"nickName,omitempty"` Title *string `gorm:"column:title;" json:"title,omitempty"` UserId *string `gorm:"column:user_id" json:"userId,omitempty"` 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 { 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.