Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Area ¶
type Area struct {
AreaId string `json:"area_id"`
AreaName string `json:"area_name"`
ParentAreaId string `json:"parent_area_id"`
}
Area 地区通用数据结构
type BigArea ¶
type BigArea struct {
model.PrimaryKeyID
AreaName string `gorm:"column:big_area_name;type:varchar(100);not null;default:''" json:"area_name"`
Province []Province `gorm:"foreignKey:BigAreaID;references:ID" json:"province"`
}
BigArea 大区
type CascadeArea ¶
type CascadeArea struct {
Province Province `json:"province"`
City City `json:"city"`
County County `json:"county"`
}
CascadeArea 级联地区
type City ¶
type City struct {
model.PrimaryKeyID
AreaName string `gorm:"column:city_name;type:varchar(100);not null;default:''" json:"area_name"`
AreaId string `gorm:"column:city_area_id;type:varchar(100);not null;default:''" json:"area_id"`
ShortAreaName string `gorm:"column:city_short_name;type:varchar(100);not null;default:''" json:"short_area_name"`
ParentId string `gorm:"column:city_parent_id;type:varchar(100);not null;default:''" json:"parent_id"`
ParentName string `gorm:"column:city_parent_name;type:varchar(100);not null;default:''" json:"parent_name"`
IsOpen uint8 `gorm:"not null;default:0;comment:是否已开通该城市 0-未开通 1-已开通" json:"is_open"`
IsHot uint8 `gorm:"not null;default:0;comment:是否热门城市 0-否 1-是" json:"is_hot"`
model.Time
}
City 市
type CodeTemplateType ¶
type CodeTemplateType string
CodeTemplateType 验证码模板类型
const ( CodeLogin CodeTemplateType = "login" // 登录 CodeForgetPassword CodeTemplateType = "forget_password" // 找回密码 CodeBindAccount CodeTemplateType = "bind_account" // 绑定账号 CodeWithdraw CodeTemplateType = "withdraw" // 提现 Code CodeTemplateType = "code" // 常规验证码 )
func (CodeTemplateType) String ¶
func (t CodeTemplateType) String() string
type County ¶
type County struct {
model.PrimaryKeyID
AreaName string `gorm:"column:county_name;type:varchar(100);not null;default:''" json:"area_name"`
AreaId string `gorm:"column:county_area_id;type:varchar(100);not null;default:''" json:"area_id"`
ParentId string `gorm:"column:county_parent_id;type:varchar(100);not null;default:''" json:"parent_id"`
ParentName string `gorm:"column:county_parent_name;type:varchar(100);not null;default:''" json:"parent_name"`
model.Time
}
County 区县
type MailConfig ¶
type MailConfig struct {
model.PrimaryKeyID
User string `gorm:"type:varchar(150);not null;default:'';comment:发件邮箱地址" json:"user"`
FromName string `gorm:"type:varchar(150);not null;default:'';comment:发送者名称" json:"from_name"`
Transport string `gorm:"type:varchar(150);not null;default:'smtp';comment:邮件传输协议" json:"transport"`
Username string `gorm:"type:varchar(150);not null;default:'';comment:用户名" json:"username"`
Password string `gorm:"type:varchar(150);not null;default:'';comment:密码" json:"password"`
Host string `gorm:"type:varchar(150);not null;default:'';comment:邮件服务器地址" json:"host"`
Port int `gorm:"not null;default:0;comment:邮件服务器端口" json:"port"`
model.Time
}
MailConfig 邮件配置
func (MailConfig) TableName ¶
func (MailConfig) TableName() string
type Province ¶
type Province struct {
model.PrimaryKeyID
AreaName string `gorm:"column:province_name;type:varchar(100);not null;default:''" json:"area_name"`
ShortAreaName string `gorm:"column:province_short_name;type:varchar(100);not null;default:''" json:"short_area_name"`
AreaId string `gorm:"column:province_area_id;type:varchar(100);not null;default:''" json:"area_id"`
BigAreaID uint64 `gorm:"not null;default:0" json:"big_area_id"`
model.Time
}
Province 省
type SenderType ¶
type SenderType string
SenderType 消息发送者类型
const ( SmsSender SenderType = "sms" EmailSender SenderType = "email" )
type SmsConfig ¶
type SmsConfig struct {
model.PrimaryKeyID
SmsType string `gorm:"type:varchar(150); not null;default:'';comment:短信服务商类型 ali_cloud-阿里云" json:"sms_type"`
AppKey string `gorm:"type:varchar(150); not null;default:'';comment:短信AppKey" json:"app_key"`
SecretKey string `gorm:"type:varchar(150); not null;default:'';comment:短信SecretKey" json:"secret_key"`
FreeSignName string `gorm:"type:varchar(150); not null;default:'';comment:短信签名" json:"free_sign_name"`
ValidCodeExpire uint `gorm:"type:int(10); not null;default:0;comment:短信验证码过期时间,单位分钟" json:"valid_code_expire"`
model.Time
}
SmsConfig 短信配置
type SmsTemplate ¶
type SmsTemplate struct {
model.PrimaryKeyID
TemplateName string `gorm:"type:varchar(150); not null; default:'';comment:模版名称" json:"template_name"`
Template string `gorm:"type:varchar(150); not null; default:'';comment:短信模版类型" json:"template"`
TemplateId string `gorm:"type:varchar(150); not null; default:'';comment:短信模版ID" json:"template_id"`
model.Time
}
SmsTemplate 短信模版
func (SmsTemplate) TableName ¶
func (SmsTemplate) TableName() string
Click to show internal directories.
Click to hide internal directories.