feat:完善信息
This commit is contained in:
45
app/common/model/manage_expert.go
Normal file
45
app/common/model/manage_expert.go
Normal file
@ -0,0 +1,45 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"SciencesServer/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ManageExpert 专家入驻信息管理
|
||||
type ManageExpert struct {
|
||||
Model
|
||||
ModelTenant
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
Area
|
||||
Position string `gorm:"column:position;type:varchar(50);default:null;comment:坐标" json:"-"`
|
||||
School string `gorm:"column:school;type:varchar(50);default:null;comment:坐标" json:"school"`
|
||||
Major string `gorm:"column:major;type:varchar(50);default:null;comment:专业" json:"major"`
|
||||
Job string `gorm:"column:job;type:varchar(50);default:null;comment:职务" json:"job"`
|
||||
Title string `gorm:"column:title;type:varchar(50);default:null;comment:职称" json:"title"`
|
||||
WorkAt time.Time `gorm:"column:work_at;type:date;not null;comment:从业时间" json:"work_at"`
|
||||
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 *ManageExpert) TableName() string {
|
||||
return "manage_expert"
|
||||
}
|
||||
|
||||
func (m *ManageExpert) GetKeywordAttribute() []string {
|
||||
keywords := make([]string, 0)
|
||||
_ = utils.FromJSON(m.Keyword, &keywords)
|
||||
return keywords
|
||||
}
|
||||
|
||||
func (m *ManageExpert) SetKeywordAttribute(keywords []string) {
|
||||
m.Keyword = utils.AnyToJSON(keywords)
|
||||
}
|
||||
|
||||
func NewManageExpert() *ManageExpert {
|
||||
return &ManageExpert{}
|
||||
}
|
42
app/common/model/manage_laboratory.go
Normal file
42
app/common/model/manage_laboratory.go
Normal file
@ -0,0 +1,42 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"SciencesServer/utils"
|
||||
)
|
||||
|
||||
// ManageLaboratory 实验室信息管理
|
||||
type ManageLaboratory struct {
|
||||
Model
|
||||
ModelTenant
|
||||
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 *ManageLaboratory) TableName() string {
|
||||
return "manage_laboratory"
|
||||
}
|
||||
|
||||
func (m *ManageLaboratory) GetKeywordAttribute() []string {
|
||||
keywords := make([]string, 0)
|
||||
_ = utils.FromJSON(m.Keyword, &keywords)
|
||||
return keywords
|
||||
}
|
||||
|
||||
func (m *ManageLaboratory) SetKeywordAttribute(keywords []string) {
|
||||
m.Keyword = utils.AnyToJSON(keywords)
|
||||
}
|
||||
|
||||
func NewManageLaboratory() *ManageLaboratory {
|
||||
return &ManageLaboratory{}
|
||||
}
|
41
app/common/model/manage_research.go
Normal file
41
app/common/model/manage_research.go
Normal file
@ -0,0 +1,41 @@
|
||||
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{}
|
||||
}
|
@ -3,15 +3,15 @@ package model
|
||||
type UserTenant struct {
|
||||
Model
|
||||
ModelTenant
|
||||
UID uint64 `gorm:"column:uid;index:idx_user_tenant_uid;type:int;default:0;comment:用户表UUID" json:"-"`
|
||||
Avatar string `gorm:"column:avatar;type:varchar(255);default:null;comment:头像" json:"avatar"`
|
||||
Name string `gorm:"column:name;type:varchar(20);default:null;comment:真实姓名" json:"name"`
|
||||
Email string `gorm:"column:email;type:varchar(50);default:null;comment:邮箱" json:"email"`
|
||||
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份信息" json:"-"`
|
||||
Address string `gorm:"column:address;type:varchar(255);default:null;comment:详细地址" json:"address"`
|
||||
Selected UserTenantSelected `gorm:"column:selected;type:tinyint(1);default:0;comment:最后一次选中的身份状态,用于下次登陆展示" json:"-"`
|
||||
Other string `gorm:"column:other;type:varchar(255);default:null;comment:其他信息" json:"-"`
|
||||
Status UserTenantStatus `gorm:"column:status;type:tinyint(0);default:0;comment:状态" json:"-"`
|
||||
UID uint64 `gorm:"column:uid;index:idx_user_tenant_uid;type:int;default:0;comment:用户表UUID" json:"-"`
|
||||
Name string `gorm:"column:name;type:varchar(20);default:null;comment:真实姓名" json:"name"`
|
||||
Email string `gorm:"column:email;type:varchar(50);default:null;comment:邮箱" json:"email"`
|
||||
Job string `gorm:"column:job;type:varchar(50);default:null;comment:职务" json:"job"`
|
||||
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份信息" json:"-"`
|
||||
FixedPhone string `gorm:"column:fixed_phone;type:varchar(20);default:null;comment:固定电话" json:"fixed_phone"`
|
||||
Address string `gorm:"column:address;type:varchar(255);default:null;comment:详细地址" json:"address"`
|
||||
Selected UserTenantSelected `gorm:"column:selected;type:tinyint(1);default:0;comment:最后一次选中的身份状态,用于下次登陆展示" json:"-"`
|
||||
Other string `gorm:"column:other;type:varchar(255);default:null;comment:其他信息" json:"-"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
@ -25,17 +25,6 @@ const (
|
||||
UserTenantSelectedForYes
|
||||
)
|
||||
|
||||
type UserTenantStatus int
|
||||
|
||||
const (
|
||||
// UserTenantStatusForExamineRefuse 审核拒绝
|
||||
UserTenantStatusForExamineRefuse UserTenantStatus = iota
|
||||
// UserTenantStatusForExamining 审核中
|
||||
UserTenantStatusForExamining
|
||||
// UserTenantStatusForExaminePass 审核通过
|
||||
UserTenantStatusForExaminePass
|
||||
)
|
||||
|
||||
func (m *UserTenant) TableName() string {
|
||||
return m.NewTableName("user_tenant")
|
||||
}
|
||||
|
Reference in New Issue
Block a user