feat:完善项目信息
This commit is contained in:
@ -5,10 +5,12 @@ import "encoding/json"
|
||||
// ServiceInnovate 创新服务数据模型
|
||||
type ServiceInnovate struct {
|
||||
Model
|
||||
Kind uint64 `gorm:"column:kind;type:int(11);default:0;comment:创新服务类型" json:"kind"`
|
||||
ModelTenant
|
||||
KindID uint64 `gorm:"column:kind_id;type:int(11);default:0;comment:类型ID" json:"-"`
|
||||
Title string `gorm:"column:title;type:varchar(50);default:'';comment:创新服务标题" json:"title"`
|
||||
Content string `gorm:"column:content;type:text;comment:创新服务内容" json:"content"`
|
||||
Tag string `gorm:"column:tag;type:varchar(255);default:'';comment:创新服务标签" json:"-"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越小,优先排序" json:"sort"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package model
|
||||
// ServiceInnovateKind 创新服务分类数据模型
|
||||
type ServiceInnovateKind struct {
|
||||
Model
|
||||
ModelTenant
|
||||
Title string `gorm:"column:title;type:varchar(50);default:'';comment:创新服务分类标题" json:"title"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(1);default:0;comment:创新服务分类排序" json:"sort"`
|
||||
ModelDeleted
|
||||
|
@ -3,28 +3,18 @@ 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"`
|
||||
ModelTenant
|
||||
KindID uint64 `gorm:"column:kind_id;type:int(11);default:0;comment:类型ID" json:"-"`
|
||||
Title string `gorm:"column:title;type:varchar(100);default:'';comment:标题" json:"title"`
|
||||
Image
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越大,优先排序" json:"sort"`
|
||||
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
|
||||
}
|
||||
|
||||
// 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"
|
||||
}
|
||||
|
48
app/common/model/service_solution_case_kind.go
Normal file
48
app/common/model/service_solution_case_kind.go
Normal file
@ -0,0 +1,48 @@
|
||||
package model
|
||||
|
||||
// ServiceSolutionCaseKind 服务解决案例数据模型
|
||||
type ServiceSolutionCaseKind struct {
|
||||
Model
|
||||
ModelTenant
|
||||
Title string `gorm:"column:title;type:varchar(100);default:'';comment:标题" json:"title"`
|
||||
Image
|
||||
Mode ServiceSolutionCaseMode `gorm:"column:mode;type:tinyint(3);default:0;comment:方案模式" json:"mode"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越小,优先排序" json:"sort"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
// ServiceSolutionCaseMode 服务解决方案模式
|
||||
type ServiceSolutionCaseMode int
|
||||
|
||||
const (
|
||||
// ServiceSolutionCaseModeForSmallCompany 中小型企业
|
||||
ServiceSolutionCaseModeForSmallCompany ServiceSolutionCaseMode = iota + 101
|
||||
// ServiceSolutionCaseModeForBigCompany 大型企业
|
||||
ServiceSolutionCaseModeForBigCompany
|
||||
// ServiceSolutionCaseModeForGovernment 政府单位
|
||||
ServiceSolutionCaseModeForGovernment
|
||||
// ServiceSolutionCaseModeForResearch 科研机构
|
||||
ServiceSolutionCaseModeForResearch
|
||||
)
|
||||
|
||||
func (m *ServiceSolutionCaseKind) TableName() string {
|
||||
return "service_solution_case_kind"
|
||||
}
|
||||
|
||||
func (m *ServiceSolutionCaseKind) ModeTitle() string {
|
||||
if m.Mode == ServiceSolutionCaseModeForSmallCompany {
|
||||
return "中小型企业"
|
||||
} else if m.Mode == ServiceSolutionCaseModeForBigCompany {
|
||||
return "中小型企业"
|
||||
} else if m.Mode == ServiceSolutionCaseModeForGovernment {
|
||||
|
||||
} else if m.Mode == ServiceSolutionCaseModeForResearch {
|
||||
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func NewServiceSolutionCaseKind() *ServiceSolutionCaseKind {
|
||||
return &ServiceSolutionCaseKind{}
|
||||
}
|
@ -8,7 +8,7 @@ type SysTenant struct {
|
||||
Contact string `gorm:"column:contact;type:varchar(30);default:'';comment:联系人" json:"contact"`
|
||||
ContactMobile string `gorm:"column:contact_mobile;type:varchar(15);default:'';comment:联系方式" json:"contact_mobile"`
|
||||
Area
|
||||
Domain string `gorm:"column:domain;type:varchar(255);default:'';comment:domain" json:"域名地址"`
|
||||
Domain string `gorm:"column:domain;type:varchar(255);default:'';comment:域名地址" json:"domain"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:'';comment:备注信息" json:"remark"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
|
Reference in New Issue
Block a user