update .gitignore
This commit is contained in:
@ -132,6 +132,7 @@ func initModel() {
|
||||
&synchronized{iModel: model.NewTechnologyProject()}, &synchronized{iModel: model.NewTechnologyTopic()},
|
||||
&synchronized{iModel: model.NewServiceDocking()}, &synchronized{iModel: model.NewServiceMessage()},
|
||||
&synchronized{iModel: model.NewServiceSolutionCase()}, &synchronized{iModel: model.NewServiceSolutionCaseDetail()},
|
||||
&synchronized{iModel: model.NewServiceInnovate()}, &synchronized{iModel: model.NewServiceInnovateKind()},
|
||||
// 活动管理
|
||||
&synchronized{iModel: model.NewActivityInstance()}, &synchronized{iModel: model.NewActivityApply()},
|
||||
&synchronized{iModel: model.NewActivityExamine()}, &synchronized{iModel: model.NewActivityJoin()},
|
||||
|
33
app/common/model/service_innovate.go
Normal file
33
app/common/model/service_innovate.go
Normal file
@ -0,0 +1,33 @@
|
||||
package model
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// ServiceInnovate 创新服务数据模型
|
||||
type ServiceInnovate struct {
|
||||
Model
|
||||
Kind uint64 `gorm:"column:kind;type:int(11);default:0;comment:创新服务类型" json:"kind"`
|
||||
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:"-"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *ServiceInnovate) TableName() string {
|
||||
return "service_innovate"
|
||||
}
|
||||
|
||||
func (m *ServiceInnovate) GetTagAttribute() []string {
|
||||
out := make([]string, 0)
|
||||
_ = json.Unmarshal([]byte(m.Tag), &out)
|
||||
return out
|
||||
}
|
||||
|
||||
func (m *ServiceInnovate) SetTagAttribute(value []string) {
|
||||
_bytes, _ := json.Marshal(value)
|
||||
m.Tag = string(_bytes)
|
||||
}
|
||||
|
||||
func NewServiceInnovate() *ServiceInnovate {
|
||||
return &ServiceInnovate{}
|
||||
}
|
18
app/common/model/service_innovate_kind.go
Normal file
18
app/common/model/service_innovate_kind.go
Normal file
@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
// ServiceInnovateKind 创新服务分类数据模型
|
||||
type ServiceInnovateKind struct {
|
||||
Model
|
||||
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
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *ServiceInnovateKind) TableName() string {
|
||||
return "service_innovate_kind"
|
||||
}
|
||||
|
||||
func NewServiceInnovateKind() *ServiceInnovateKind {
|
||||
return &ServiceInnovateKind{}
|
||||
}
|
Reference in New Issue
Block a user