feat:完善入驻信息管理
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/utils"
|
||||
import (
|
||||
"SciencesServer/utils"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// ManageAgent 经纪人入驻信息管理
|
||||
type ManageAgent struct {
|
||||
@ -9,18 +12,22 @@ type ManageAgent struct {
|
||||
Name string `gorm:"column:name;type:varchar(30);default:'';comment:姓名" json:"name"`
|
||||
Mobile string `gorm:"column:mobile;type:varchar(15);default:'';comment:联系方式" json:"mobile"`
|
||||
IDCard string `gorm:"column:id_card;type:varchar(18);default:'';comment:身份证号" json:"id_card"`
|
||||
IDImage string `gorm:"column:id_image;type:text;comment:身份证图片" json:"-"`
|
||||
Industry string `gorm:"column:industry;type:varchar(255);default:'';comment:行业领域" json:"industry"`
|
||||
Keyword string `gorm:"column:keyword;type:varchar(255);default:'';comment:关键词" json:"-"`
|
||||
WorkExperience string `gorm:"column:work_experience;type:varchar(255);default:'';comment:工作经历" json:"work_experience"`
|
||||
WorkPlace string `gorm:"column:work_place;type:varchar(255);default:0;comment:工作地点" json:"work_place"`
|
||||
IDImage string `gorm:"column:id_image;type:text;comment:身份证图片" json:"-"`
|
||||
CredentialImage string `gorm:"column:credential_image;type:varchar(255);default:'';comment:资格证书" json:"credential_image"`
|
||||
Examine
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
// ManageAgentIDImage 身份证信息
|
||||
type ManageAgentIDImage struct {
|
||||
Front string `json:"front"`
|
||||
Behind string `json:"behind"`
|
||||
Hold string `json:"hold"`
|
||||
}
|
||||
|
||||
func (m *ManageAgent) TableName() string {
|
||||
@ -47,6 +54,17 @@ func (m *ManageAgent) SetKeywordAttribute(value []string) {
|
||||
m.Keyword = utils.AnyToJSON(value)
|
||||
}
|
||||
|
||||
func (m *ManageAgent) GetIDImageAttribute() *ManageAgentIDImage {
|
||||
out := new(ManageAgentIDImage)
|
||||
_ = json.Unmarshal([]byte(m.IDImage), out)
|
||||
return out
|
||||
}
|
||||
|
||||
func (m *ManageAgent) SetIDImageAttribute(value *ManageAgentIDImage) {
|
||||
_bytes, _ := json.Marshal(value)
|
||||
m.IDImage = string(_bytes)
|
||||
}
|
||||
|
||||
func (m *ManageAgent) GetCredentialImageAttribute() []string {
|
||||
out := make([]string, 0)
|
||||
_ = utils.FromJSON(m.CredentialImage, &out)
|
||||
|
Reference in New Issue
Block a user