42 lines
1.3 KiB
Go
42 lines
1.3 KiB
Go
package model
|
|
|
|
import (
|
|
"SciencesServer/utils"
|
|
)
|
|
|
|
// ManageResearch 科研机构信息管理
|
|
type ManageResearch struct {
|
|
Model
|
|
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
|
Name string `gorm:"column:name;type:varchar(30);default:null;comment:名称" json:"name"`
|
|
Code string `gorm:"column:code;type:varchar(30);default:null;comment:信用代码" json:"code"`
|
|
Image
|
|
Area
|
|
Position string `gorm:"column:position;type:varchar(50);default:null;comment:坐标" json:"-"`
|
|
Industry uint64 `gorm:"column:industry;type:int(11);default:0;comment:行业领域" json:"industry"`
|
|
Keyword string `gorm:"column:keyword;type:varchar(255);default:null;comment:关键词" json:"keyword"`
|
|
Research string `gorm:"column:research;type:varchar(255);default:null;comment:研究信息" json:"research"`
|
|
Introduce string `gorm:"column:introduce;type:text;comment:介绍描述" json:"introduce"`
|
|
ExamineStatus
|
|
ModelDeleted
|
|
ModelAt
|
|
}
|
|
|
|
func (m *ManageResearch) TableName() string {
|
|
return "manage_expert"
|
|
}
|
|
|
|
func (m *ManageResearch) GetKeywordAttribute() []string {
|
|
keywords := make([]string, 0)
|
|
_ = utils.FromJSON(m.Keyword, &keywords)
|
|
return keywords
|
|
}
|
|
|
|
func (m *ManageResearch) SetKeywordAttribute(keywords []string) {
|
|
m.Keyword = utils.AnyToJSON(keywords)
|
|
}
|
|
|
|
func NewManageResearch() *ManageResearch {
|
|
return &ManageResearch{}
|
|
}
|