model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Verified   = 1
	UnVerified = 0
)

Variables

This section is empty.

Functions

func Tables

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

Types

type EnterpriseUserInfo

type EnterpriseUserInfo struct {
	app.TenantPk
	UserCode string `orm:"column(user_code)"`
	Name     string `orm:"column(name)"`
	app.TableChangeInfo
}

EnterpriseUserInfo 企业用户(商户)

type Mfa

type Mfa struct {
	app.Pk
	MfaCode           string      `orm:"column(mfa_code)"`
	MfaType           MfaCategory `orm:"column(mfa_type)"`
	SecretPhoneNumber string      `orm:"column(secret_phone_number)"`
	SecretEmail       string      `orm:"column(secret_email)"`
	app.TableChangeInfo
}

type MfaCategory

type MfaCategory string
const (
	MfaUnknown     MfaCategory = "unknown"                 // 未指定
	MfaPhoneNumber MfaCategory = "phone_number"            // 手机号
	MfaEmail       MfaCategory = "email"                   //  邮箱
	MfaWechat      MfaCategory = "wechat"                  // 微信(union_id优先)
	MfaGoogle      MfaCategory = "google_authenticator"    // google验证器
	MfaMicrosoft   MfaCategory = "microsoft_authenticator" // 微软验证器
)

type MfaDevice

type MfaDevice struct {
	app.Pk
	MfaCode string `orm:"column(mfa_code)"` // MFA编号
	Key     string `orm:"column(key)"`      // MFA设备
	app.TableInfo
}

MfaDevice 受信任设备列表

type MfaItem

type MfaItem struct {
	app.Pk
	MfaCode  string      `orm:"column(mfa_code)"`     // MFA编号
	Sn       string      `orm:"column(sn)"`           // 验证编号
	Category MfaCategory `orm:"column(mfa_category)"` // 验证类型
	app.TableChangeInfo
}

type Notify added in v0.0.4

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

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

type NotifyCategory added in v0.0.4

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 added in v0.0.4

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

type SdkConfig

type SdkConfig struct {
	app.Pk
	Wechat   string `orm:"column(wechat)"`   // 微信
	Tianditu string `orm:"column(tianditu)"` // 天地图
	app.TableInfo
}

type UserInfo

type UserInfo struct {
	app.Pk
	UserCode string `orm:"column(user_code)"`
	Username string `orm:"username"`
	Password string `orm:"password"`
	Email    string `orm:"email"`
	Phone    string `orm:"phone"`
	app.TableChangeInfo
}

UserInfo 普通用户

type UserProfile

type UserProfile struct {
	app.Pk
	UserCode       string     `orm:"column(user_code)"`        // 用户编号
	RealName       string     `orm:"column(real_name)"`        // 真实姓名
	IdCard         string     `orm:"column(id_card)"`          // 身份证号
	IdCardVerified VerifyFlag `orm:"column(id_card_verified)"` // 身份证号验证标记
	app.TableChangeInfo
}

UserProfile 用户档案,每个用户必须有

type VerifyFlag

type VerifyFlag int

Jump to

Keyboard shortcuts

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