feat:完善项目管理

This commit is contained in:
henry
2021-12-14 09:05:47 +08:00
parent 4e1f179af7
commit 3bb8f96d84
9 changed files with 312 additions and 4 deletions

View File

@ -0,0 +1,31 @@
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{}
}

View File

@ -0,0 +1,22 @@
package model
import "time"
// TechnologyDemandVisit 技术需求访问数据模型
type TechnologyDemandVisit struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
DemandID uint64 `gorm:"column:demand_id;index:idx_demand_visit_demand;type:int(11);default:0;comment:科技产品ID" json:"product_id"`
Count int `gorm:"column:count;type:int(8);default:0;comment:浏览次数" json:"count"`
Date time.Time `gorm:"column:date;type:datetime;not null;comment:浏览时间" json:"date"`
ModelDeleted
ModelAt
}
func (m *TechnologyDemandVisit) TableName() string {
return "technology_demand_visit"
}
func NewTechnologyDemandVisit() *TechnologyDemandVisit {
return &TechnologyDemandVisit{}
}