feat:完善项目信息

This commit is contained in:
henry
2021-12-27 11:48:44 +08:00
parent 4926c5b765
commit 45b2e85cfd
23 changed files with 92 additions and 240 deletions

View File

@ -1,22 +0,0 @@
package model
import "time"
// ManageExpertVisit 专家浏览记录数据模型
type ManageExpertVisit struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
ExpertID uint64 `gorm:"column:expert_id;index:idx_expert_visit_expert;type:int(11);default:0;comment:专家ID" json:"-"`
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 *ManageExpertVisit) TableName() string {
return "manage_expert_visit"
}
func NewManageExpertVisit() *ManageExpertVisit {
return &ManageExpertVisit{}
}

View File

@ -1,18 +0,0 @@
package model
// ManageLaboratoryCollect 实验室收藏数据模型
type ManageLaboratoryCollect struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
LaboratoryID uint64 `gorm:"column:laboratory_id;type:int(11);default:0;comment:实验室ID" json:"-"`
ModelDeleted
ModelAt
}
func (m *ManageLaboratoryCollect) TableName() string {
return "manage_laboratory_collect"
}
func NewManageLaboratoryCollect() *ManageLaboratoryCollect {
return &ManageLaboratoryCollect{}
}

View File

@ -1,22 +0,0 @@
package model
import "time"
// ManageLaboratoryVisit 实验室浏览记录数据模型
type ManageLaboratoryVisit struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
LaboratoryID uint64 `gorm:"column:laboratory_id;index:idx_laboratory_visit_laboratory;type:int(11);default:0;comment:实验室ID" json:"-"`
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 *ManageLaboratoryVisit) TableName() string {
return "manage_laboratory_visit"
}
func NewManageLaboratoryVisit() *ManageLaboratoryVisit {
return &ManageLaboratoryVisit{}
}

View File

@ -1,18 +0,0 @@
package model
// TechnologyAchievementCollect 科技成果收藏数据模型
type TechnologyAchievementCollect struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
AchievementID uint64 `gorm:"column:achievement_id;type:int(11);default:0;comment:科技成果ID" json:"-"`
ModelDeleted
ModelAt
}
func (m *TechnologyAchievementCollect) TableName() string {
return "technology_achievement_collect"
}
func NewTechnologyAchievementCollect() *TechnologyAchievementCollect {
return &TechnologyAchievementCollect{}
}

View File

@ -1,22 +0,0 @@
package model
import "time"
// TechnologyAchievementVisit 科技成果访问数据模型
type TechnologyAchievementVisit struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
AchievementID uint64 `gorm:"column:achievement_id;index:idx_achievement_visit_achievement;type:int(11);default:0;comment:科技成果ID" json:"-"`
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 *TechnologyAchievementVisit) TableName() string {
return "technology_achievement_visit"
}
func NewTechnologyAchievementVisit() *TechnologyAchievementVisit {
return &TechnologyAchievementVisit{}
}

View File

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

View File

@ -1,22 +0,0 @@
package model
import "time"
// TechnologyProductVisit 技术产品访问数据模型
type TechnologyProductVisit struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
ProductID uint64 `gorm:"column:product_id;index:idx_product_visit_product;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 *TechnologyProductVisit) TableName() string {
return "technology_product_visit"
}
func NewTechnologyProductVisit() *TechnologyProductVisit {
return &TechnologyProductVisit{}
}

View File

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

View File

@ -17,6 +17,12 @@ const (
UserCollectKindForLaboratory UserCollectKind = iota + 1
// UserCollectKindForExpert 专家
UserCollectKindForExpert
// UserCollectKindForCompany 公司
UserCollectKindForCompany
// UserCollectKindForTechnologyAchievement 技术成果
UserCollectKindForTechnologyAchievement
// UserCollectKindForTechnologyProduct 技术产品
UserCollectKindForTechnologyProduct
)
func (m *UserCollect) TableName() string {

View File

@ -21,6 +21,12 @@ const (
UserVisitKindForLaboratory UserCollectKind = iota + 1
// UserVisitKindForExpert 专家
UserVisitKindForExpert
// UserVisitKindForCompany 公司
UserVisitKindForCompany
// UserVisitKindForTechnologyAchievement 技术成果
UserVisitKindForTechnologyAchievement
// UserVisitKindForTechnologyProduct 技术产品
UserVisitKindForTechnologyProduct
)
func (m *UserVisit) TableName() string {