feat:完善网站信息,增加案例解决方案数据管理
This commit is contained in:
@ -130,7 +130,8 @@ func initModel() {
|
||||
&synchronized{iModel: model.NewTechnologyAchievement()}, &synchronized{iModel: model.NewTechnologyDemand()},
|
||||
&synchronized{iModel: model.NewTechnologyPaper()}, &synchronized{iModel: model.NewTechnologyProduct()},
|
||||
&synchronized{iModel: model.NewTechnologyProject()}, &synchronized{iModel: model.NewTechnologyTopic()},
|
||||
&synchronized{iModel: model.NewServiceDocking()},
|
||||
&synchronized{iModel: model.NewServiceDocking()}, &synchronized{iModel: model.NewServiceMessage()},
|
||||
&synchronized{iModel: model.NewServiceSolutionCase()}, &synchronized{iModel: model.NewServiceSolutionCaseDetail()},
|
||||
// 活动管理
|
||||
&synchronized{iModel: model.NewActivityInstance()}, &synchronized{iModel: model.NewActivityApply()},
|
||||
&synchronized{iModel: model.NewActivityExamine()}, &synchronized{iModel: model.NewActivityJoin()},
|
||||
|
34
app/common/model/service_solution_case.go
Normal file
34
app/common/model/service_solution_case.go
Normal file
@ -0,0 +1,34 @@
|
||||
package model
|
||||
|
||||
// ServiceSolutionCase 服务解决案例数据模型
|
||||
type ServiceSolutionCase struct {
|
||||
Model
|
||||
Kind ServiceSolutionCaseKind `gorm:"column:kind;type:tinyint(3);default:0;comment:类型" json:"kind"`
|
||||
Title string `gorm:"column:title;type:varchar(20);default:'';comment:标题" json:"title"`
|
||||
Image
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越大,优先排序" json:"sort"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
// ServiceSolutionCaseKind 服务解决方案类型
|
||||
type ServiceSolutionCaseKind int
|
||||
|
||||
const (
|
||||
// ServiceSolutionCaseKindForSmallCompany 中小型企业
|
||||
ServiceSolutionCaseKindForSmallCompany ServiceSolutionCaseKind = iota + 101
|
||||
// ServiceSolutionCaseKindForBigCompany 大型企业
|
||||
ServiceSolutionCaseKindForBigCompany
|
||||
// ServiceSolutionCaseKindForGovernment 政府单位
|
||||
ServiceSolutionCaseKindForGovernment
|
||||
// ServiceSolutionCaseKindForResearch 科研机构
|
||||
ServiceSolutionCaseKindForResearch
|
||||
)
|
||||
|
||||
func (m *ServiceSolutionCase) TableName() string {
|
||||
return "service_solution_case"
|
||||
}
|
||||
|
||||
func NewServiceSolutionCase() *ServiceSolutionCase {
|
||||
return &ServiceSolutionCase{}
|
||||
}
|
23
app/common/model/service_solution_case_detail.go
Normal file
23
app/common/model/service_solution_case_detail.go
Normal file
@ -0,0 +1,23 @@
|
||||
package model
|
||||
|
||||
// ServiceSolutionCaseDetail 服务解决案例数据模型
|
||||
type ServiceSolutionCaseDetail struct {
|
||||
Model
|
||||
SolutionCaseID uint64 `json:"solution_case_id"`
|
||||
Title string `gorm:"column:title;type:varchar(100);default:'';comment:标题" json:"title"`
|
||||
Image
|
||||
Description string `gorm:"column:description;type:varchar(255);comment:描述" json:"description"`
|
||||
Content string `gorm:"column:content;type:text;comment:内容" json:"content"`
|
||||
Visits int `gorm:"column:visits;type:int(6);default:0;comment:浏览数" json:"visits"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越大,优先排序" json:"sort"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *ServiceSolutionCaseDetail) TableName() string {
|
||||
return "service_solution_case_detail"
|
||||
}
|
||||
|
||||
func NewServiceSolutionCaseDetail() *ServiceSolutionCaseDetail {
|
||||
return &ServiceSolutionCaseDetail{}
|
||||
}
|
15
app/common/model/sys_banner.go
Normal file
15
app/common/model/sys_banner.go
Normal file
@ -0,0 +1,15 @@
|
||||
package model
|
||||
|
||||
type SysBanner struct {
|
||||
Model
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *SysBanner) TableName() string {
|
||||
return "sys_banner"
|
||||
}
|
||||
|
||||
func NewSysBanner() *SysBanner {
|
||||
return &SysBanner{}
|
||||
}
|
Reference in New Issue
Block a user