2023-01-18 09:03:15 +00:00
|
|
|
package model
|
|
|
|
|
2023-02-20 04:51:50 +00:00
|
|
|
// 实名认证模型
|
2023-01-18 09:03:15 +00:00
|
|
|
type RealName struct {
|
2023-02-15 01:10:11 +00:00
|
|
|
Model
|
2023-02-20 04:51:50 +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
|
|
|
}
|