feat:完善产品详情
This commit is contained in:
@ -124,6 +124,7 @@ func initModel() {
|
||||
&synchronized{iModel: model.NewManageCompany()}, &synchronized{iModel: model.NewManageExpert()},
|
||||
&synchronized{iModel: model.NewManageLaboratory()}, &synchronized{iModel: model.NewManageResearch()},
|
||||
&synchronized{iModel: model.NewManageAgent()},
|
||||
// 数据管理
|
||||
)
|
||||
}
|
||||
func initCacheMode() {
|
||||
|
@ -17,6 +17,7 @@ type ManageCompany struct {
|
||||
License string `gorm:"column:license;type:varchar(255);default:'';comment:营业执照" json:"license"`
|
||||
Industry string `gorm:"column:industry;type:varchar(255);default:'';comment:行业领域" json:"-"`
|
||||
Keyword string `gorm:"column:keyword;type:varchar(255);default:'';comment:关键词" json:"-"`
|
||||
Direction string `gorm:"column:direction;type:varchar(255);default:'';comment:生产方向" json:"-"`
|
||||
Introduce string `gorm:"column:introduce;type:text;comment:介绍描述" json:"introduce"`
|
||||
Examine
|
||||
ModelDeleted
|
||||
@ -63,6 +64,16 @@ func (m *ManageCompany) SetKeywordAttribute(value []string) {
|
||||
m.Keyword = utils.AnyToJSON(value)
|
||||
}
|
||||
|
||||
func (m *ManageCompany) GetDirectionAttribute() []string {
|
||||
out := make([]string, 0)
|
||||
_ = utils.FromJSON(m.Direction, &out)
|
||||
return out
|
||||
}
|
||||
|
||||
func (m *ManageCompany) SetDirectionAttribute(value []string) {
|
||||
m.Direction = utils.AnyToJSON(value)
|
||||
}
|
||||
|
||||
func NewManageCompany() *ManageCompany {
|
||||
return &ManageCompany{}
|
||||
}
|
||||
|
18
app/common/model/user_company_collect.go
Normal file
18
app/common/model/user_company_collect.go
Normal file
@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
// TechnologyProductCollect 产品收藏数据模型
|
||||
type TechnologyProductCollect struct {
|
||||
Model
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
ProductID uint64 `gorm:"column:product_id;type:int(11);default:0;comment:产品ID" json:"-"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *TechnologyProductCollect) TableName() string {
|
||||
return "technology_product_collect"
|
||||
}
|
||||
|
||||
func NewTechnologyProductCollect() *TechnologyProductCollect {
|
||||
return &TechnologyProductCollect{}
|
||||
}
|
Reference in New Issue
Block a user