32 lines
886 B
Go
32 lines
886 B
Go
package model
|
|
|
|
import "SciencesServer/utils"
|
|
|
|
// ManageAgentCompany 经纪人服务公司数据模型
|
|
type ManageAgentCompany struct {
|
|
Model
|
|
AgentID uint64 `gorm:"column:agent_id;type:int(11);default:0;comment:经纪人模型ID" json:"-"`
|
|
Name string `gorm:"column:name;type:varchar(100);default:'';comment:公司名称" json:"name"`
|
|
Industry string `gorm:"column:industry;type:varchar(255);default:'';comment:行业领域" json:"-"`
|
|
ModelDeleted
|
|
ModelAt
|
|
}
|
|
|
|
func (m *ManageAgentCompany) TableName() string {
|
|
return "manage_agent_company"
|
|
}
|
|
|
|
func (m *ManageAgentCompany) GetIndustryAttribute() []string {
|
|
out := make([]string, 0)
|
|
_ = utils.FromJSON(m.Industry, &out)
|
|
return out
|
|
}
|
|
|
|
func (m *ManageAgentCompany) SetIndustryAttribute(value []string) {
|
|
m.Industry = utils.AnyToJSON(value)
|
|
}
|
|
|
|
func NewManageAgentCompany() *ManageAgentCompany {
|
|
return &ManageAgentCompany{}
|
|
}
|