fonchain-artistinfo/cmd/model/real_name.go

34 lines
749 B
Go
Raw Normal View History

2023-01-18 09:03:15 +00:00
package model
// 实名认证模型
2023-01-18 09:03:15 +00:00
type RealName struct {
2023-02-15 01:10:11 +00:00
Model
2023-03-21 05:56:35 +00:00
Name string `gorm:"not null"`
IdNum string `gorm:"type:varchar(18) not null"`
// TelNum string `gorm:"type:varchar(11) not null"`
IdCardFront string `gorm:"column:idcard_front;comment:身份证正面"`
IdCardBack string `gorm:"column:idcard_back;comment:身份证反面"`
Age int `gorm:"column:age"`
Sex SexType `gorm:"column:sex"`
Birthday string `gorm:"column:birthday"`
Address string `gorm:"column:address"`
}
func (r RealName) TableName() string {
return "real_name"
}
type SexType string
func (s SexType) ConvertInt32() int32 {
switch s {
case "男":
return 1
case "女":
return 2
default: //其它
return 3
}
2023-01-18 09:03:15 +00:00
}