model

package
v0.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InActiveDisable = 0 // 未激活
	ActivateEnable  = 1 // 激活
)

Variables

This section is empty.

Functions

func Tables

func Tables() (t []interface{})

Types

type Account

type Account struct {
	app.Pk
	Code string `orm:"column(code)"`
	app.TableChangeInfo
	Profile
	IdCard
	AccountMobile
	AccountEmail
	AccountPassword
}

Account 账号

type AccountEmail

type AccountEmail struct {
	Email         string `orm:"column(email);null"`
	EmailVerified int    `orm:"column(email_verified);null"`
}

AccountEmail MFA邮箱

type AccountMobile

type AccountMobile struct {
	Mobile         string `orm:"column(mobile);null"`
	MobileVerified int    `orm:"column(mobile_verified);null"`
}

AccountMobile MFA手机号

type AccountPassword

type AccountPassword struct {
	Password        string `orm:"column(password);null"`
	PasswordVersion int    `orm:"column(password_version);null"` // 比系统版本低就需要重置密码
}

AccountPassword 密码配置

type IdCard

type IdCard struct {
	IdType     int    `orm:"column(id_type);null"`
	IdNumber   string `orm:"column(id_number);null"`
	IdVerified int    `orm:"column(id_verified);null"`
}

IdCard 证件配置

type LoginType

type LoginType string
const (
	PcLoginType  LoginType = "pc"  //pc登录
	WxLoginType  LoginType = "wx"  //微信登录
	AppLoginType LoginType = "app" //app登录
)

type Notify

type Notify struct {
	app.Pk
	Template string         `orm:"column(template);null"`
	Category NotifyCategory `orm:"column(category);null"`
	app.TableChangeInfo
}

Notify 通知配置(模板:类型)

type NotifyCategory

type NotifyCategory string
const (
	EmailSighup NotifyCategory = "email_sighup"  // email注册码
	SmsSighup   NotifyCategory = "sms_sighup"    // sms注册码
	EmailSighIn NotifyCategory = "email_sigh_in" // email登录码
	SmsSighIn   NotifyCategory = "sms_sigh_in"   // sms登录码
	EmailBind   NotifyCategory = "email_bind"    // email绑定
	SmsBind     NotifyCategory = "sms_bind"      // sms绑定
)

type NotifyType

type NotifyType string
const (
	SmsNotifyType  NotifyType = "sms"  //短信验证
	MailNotifyType NotifyType = "mail" //邮箱验证
)

type Profile

type Profile struct {
	Name   string `orm:"column(name);null"`   // 名称
	Avatar string `orm:"column(avatar);null"` // 头像
	Active int    `orm:"column(active);null"` // 激活(完成MFA其中一项都可以判定为激活)
}

Profile 用户信息

type SocialAccount

type SocialAccount struct {
	app.Pk
	AccountId       int            `orm:"column(account_id);null"`
	SocialAccountId string         `orm:"column(social_account_id);null"` // 第三方账号的key
	SocialGroupId   string         `orm:"column(social_group_id);null"`   // 对应微信union id,如没有可置空
	Category        SocialCategory `orm:"column(category);null"`
	app.TableChangeInfo
}

SocialAccount 第三方账号关联

type SocialCategory

type SocialCategory string
const (
	SocialWeChat      SocialCategory = "wechat"      // 微信
	WeChatMiniProgram SocialCategory = "mini_wx"     // 微信小程序
	WeChatOfficial    SocialCategory = "official_wx" // 微信公众号
	WeChatQiye        SocialCategory = "qiye_wx"     // 企业微信
)

type SocialConfig added in v0.2.2

type SocialConfig struct {
	app.Pk
	Channel   SocialCategory `orm:"column(channel)"`
	AppId     string         `orm:"column(appId)"`
	AppSecret string         `orm:"column(appSecret)"`
	app.TableChangeInfo
}

type Tenant

type Tenant struct {
	app.Pk
	Name string `orm:"column(name);null"`
	Code string `orm:"column(code);null"`
	app.TableChangeInfo
}

Tenant 组织

type TenantAccount

type TenantAccount struct {
	app.TenantPk
	Uid int
	app.TableChangeInfo
}

TenantAccount 账号--组织关系

type ThemeConfig added in v0.2.0

type ThemeConfig struct {
	app.Pk
	ConfigPage        string `orm:"column(config_page);null"`      //配置所属页
	ConfigTheme       string `orm:"column(config_theme);null"`     //配置字段名称
	ConfigName        string `orm:"column(config_name);null"`      //配置字段名称
	ConfigContent     string `orm:"column(config_content);null"`   //配置字段内容
	ConfigContentType string `orm:"column(config_name_Type);null"` //配置字段内容类型
	app.TableChangeInfo
}

ThemeConfig 配置

type ThemeConfigContentType added in v0.2.0

type ThemeConfigContentType string
const (
	BooleanConfigContentType ThemeConfigContentType = "boolean"
	NumberConfigContentType  ThemeConfigContentType = "int"
	StringConfigContentType  ThemeConfigContentType = "string"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL