81 lines
2.5 KiB
Go
81 lines
2.5 KiB
Go
package model
|
|
|
|
import (
|
|
"SciencesServer/utils"
|
|
"encoding/json"
|
|
)
|
|
|
|
// ManageAgent 经纪人入驻信息管理
|
|
type ManageAgent struct {
|
|
Model
|
|
ModelTenant
|
|
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:"-"`
|
|
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"`
|
|
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 {
|
|
return "manage_agent"
|
|
}
|
|
|
|
func (m *ManageAgent) GetIndustryAttribute() []string {
|
|
out := make([]string, 0)
|
|
_ = utils.FromJSON(m.Industry, &out)
|
|
return out
|
|
}
|
|
|
|
func (m *ManageAgent) SetIndustryAttribute(value []string) {
|
|
m.Industry = utils.AnyToJSON(value)
|
|
}
|
|
|
|
func (m *ManageAgent) GetKeywordAttribute() []string {
|
|
out := make([]string, 0)
|
|
_ = utils.FromJSON(m.Keyword, &out)
|
|
return out
|
|
}
|
|
|
|
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)
|
|
return out
|
|
}
|
|
|
|
func (m *ManageAgent) SetCredentialImageAttribute(value []string) {
|
|
m.CredentialImage = utils.AnyToJSON(value)
|
|
}
|
|
|
|
func NewManageAgent() *ManageAgent {
|
|
return &ManageAgent{}
|
|
}
|