feat:完善入驻信息管理
This commit is contained in:
@ -103,6 +103,21 @@ const (
|
||||
ExamineStatusForRefuse
|
||||
)
|
||||
|
||||
// InvalidStatus 失效状态
|
||||
type InvalidStatus struct {
|
||||
Status ExamineStatusKind `gorm:"column:status;type:tinyint(1);default:0;comment:失效状态(0:未失效,1:已失效" json:"status"`
|
||||
}
|
||||
|
||||
// InvalidStatusKind 失效状态
|
||||
type InvalidStatusKind int
|
||||
|
||||
const (
|
||||
// InvalidStatusForNot 未失效
|
||||
InvalidStatusForNot InvalidStatusKind = iota
|
||||
// InvalidStatusForYes 已失效
|
||||
InvalidStatusForYes
|
||||
)
|
||||
|
||||
type Area struct {
|
||||
Province string `gorm:"column:province;type:varchar(8);default:null;comment:所在省" json:"province"`
|
||||
City string `gorm:"column:city;type:varchar(8);default:null;comment:所在市" json:"city"`
|
||||
|
@ -6,12 +6,13 @@ import "SciencesServer/utils"
|
||||
type ManageCompany struct {
|
||||
Model
|
||||
Local
|
||||
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"`
|
||||
InviterID uint64 `gorm:"column:inviter_id;type:int;default:0;comment:邀请人ID" json:"inviter_id"`
|
||||
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
|
||||
Industry string `gorm:"column:industry;type:varchar(255);default:0;comment:行业领域" json:"industry"`
|
||||
WebUrl string `gorm:"column:web_url;type:varchar(255);default:null;comment:企业网站" json:"web_url"`
|
||||
Industry string `gorm:"column:industry;type:varchar(255);default:null;comment:行业领域" json:"industry"`
|
||||
Keyword string `gorm:"column:keyword;type:varchar(255);default:null;comment:关键词" json:"keyword"`
|
||||
Introduce string `gorm:"column:introduce;type:text;comment:介绍描述" json:"introduce"`
|
||||
ExamineStatus
|
||||
|
@ -30,6 +30,16 @@ func (m *ManageExpert) TableName() string {
|
||||
return "manage_expert"
|
||||
}
|
||||
|
||||
func (m *ManageExpert) GetIndustryAttribute() []string {
|
||||
out := make([]string, 0)
|
||||
_ = utils.FromJSON(m.Industry, &out)
|
||||
return out
|
||||
}
|
||||
|
||||
func (m *ManageExpert) SetIndustryAttribute(value []string) {
|
||||
m.Industry = utils.AnyToJSON(value)
|
||||
}
|
||||
|
||||
func (m *ManageExpert) GetKeywordAttribute() []string {
|
||||
keywords := make([]string, 0)
|
||||
_ = utils.FromJSON(m.Keyword, &keywords)
|
||||
|
@ -3,14 +3,21 @@ package model
|
||||
// SysIdentity 身份管理数据模型
|
||||
type SysIdentity struct {
|
||||
Model
|
||||
Identity int `gorm:"column:identity;uniqueIndex:idx_sys_identity;type:tinyint(3);default:0;comment:身份信息" json:"identity"`
|
||||
Name string `gorm:"column:name;type:varchar(20);default:null;comment:身份名称" json:"name"`
|
||||
RegisterCount int `gorm:"column:register_count;type:tinyint(3);default:0;comment:每个平台下可以最大注册人数,-1不作限制" json:"register_count"`
|
||||
IsExamine int `gorm:"column:is_examine;type:tinyint(1);default:0;comment:是否需要后台审核" json:"is_examine"`
|
||||
Identity int `gorm:"column:identity;uniqueIndex:idx_sys_identity;type:tinyint(3);default:0;comment:身份信息" json:"identity"`
|
||||
Name string `gorm:"column:name;type:varchar(20);default:null;comment:身份名称" json:"name"`
|
||||
RegisterCount int `gorm:"column:register_count;type:tinyint(3);default:0;comment:每个平台下可以最大注册人数,-1不作限制" json:"register_count"`
|
||||
IsExamine SysIdentityExamine `gorm:"column:is_examine;type:tinyint(1);default:1;comment:是否需要后台审核" json:"is_examine"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
type SysIdentityExamine int
|
||||
|
||||
const (
|
||||
SysIdentityExamineForNot SysIdentityExamine = iota
|
||||
SysIdentityExamineForYes
|
||||
)
|
||||
|
||||
func (m *SysIdentity) TableName() string {
|
||||
return "sys_identity"
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ type UserCompany struct {
|
||||
Model
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
CompanyID uint64 `gorm:"column:company_id;type:int(11);default:0;comment:公司模型ID" json:"-"`
|
||||
InvalidStatus
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
Reference in New Issue
Block a user