feat:完善入驻信息管理
This commit is contained in:
@ -74,6 +74,16 @@ func initModel() {
|
||||
// 日志管理
|
||||
&synchronized{iModel: model.NewSysUserRole()},
|
||||
&synchronized{iModel: model.NewSysLog()}, &synchronized{iModel: model.NewSysUserLoginLog()},
|
||||
// 用户管理
|
||||
&synchronized{iModel: model.NewUserInstance()}, &synchronized{iModel: model.NewUserIdentity()},
|
||||
&synchronized{iModel: model.NewUserPatent()}, &synchronized{iModel: model.NewUserBank()},
|
||||
&synchronized{iModel: model.NewUserCompany()}, &synchronized{iModel: model.NewUserExpert()},
|
||||
&synchronized{iModel: model.NewUserLaboratory()}, &synchronized{iModel: model.NewUserResearch()},
|
||||
&synchronized{iModel: model.NewUserAgent()},
|
||||
// 入驻管理
|
||||
&synchronized{iModel: model.NewManageCompany()}, &synchronized{iModel: model.NewManageExpert()},
|
||||
&synchronized{iModel: model.NewManageLaboratory()}, &synchronized{iModel: model.NewManageResearch()},
|
||||
&synchronized{iModel: model.NewManageAgent()},
|
||||
)
|
||||
}
|
||||
func initCacheMode() {
|
||||
|
@ -72,9 +72,9 @@ const (
|
||||
AccountStatusForDisable
|
||||
)
|
||||
|
||||
// ShelfStatus 上下架状态
|
||||
type ShelfStatus struct {
|
||||
Shelf ShelfStatusKind `gorm:"column:shelf;type:tinyint(1);default:0;comment:上下架状态(1:上架,2:下架)" json:"shelf"`
|
||||
// Shelf 上下架状态
|
||||
type Shelf struct {
|
||||
ShelfStatus ShelfStatusKind `gorm:"column:shelf_status;type:tinyint(1);default:0;comment:上下架状态(1:上架,2:下架)" json:"shelf_status"`
|
||||
}
|
||||
|
||||
type ShelfStatusKind int
|
||||
@ -86,9 +86,9 @@ const (
|
||||
ShelfStatusForDown
|
||||
)
|
||||
|
||||
// ExamineStatus 审核状态
|
||||
type ExamineStatus struct {
|
||||
Status ExamineStatusKind `gorm:"column:status;type:tinyint(1);default:0;comment:审核状态(0:审核中,1:审核通过,2:审核拒绝)" json:"status"`
|
||||
// Examine 审核状态
|
||||
type Examine struct {
|
||||
ExamineStatus ExamineStatusKind `gorm:"column:examine_status;type:tinyint(1);default:0;comment:审核状态(0:审核中,1:审核通过,2:审核拒绝)" json:"examine_status"`
|
||||
ExamineRemark string `gorm:"column:examine_remark;type:varchar(255);default:null;comment:审核备注" json:"examine_remark"`
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ const (
|
||||
|
||||
// InvalidStatus 失效状态
|
||||
type InvalidStatus struct {
|
||||
Status ExamineStatusKind `gorm:"column:status;type:tinyint(1);default:0;comment:失效状态(0:未失效,1:已失效" json:"status"`
|
||||
InvalidStatus ExamineStatusKind `gorm:"column:invalid_status;type:tinyint(1);default:0;comment:失效状态(0:未失效,1:已失效" json:"invalid_status"`
|
||||
}
|
||||
|
||||
// InvalidStatusKind 失效状态
|
||||
|
@ -15,10 +15,14 @@ type ManageAgent struct {
|
||||
WorkPlace string `gorm:"column:work_place;type:varchar(255);default:0;comment:工作地点" json:"work_place"`
|
||||
IDImage string `gorm:"column:id_image;type:text;default:null;comment:身份证图片" json:"-"`
|
||||
CredentialImage string `gorm:"column:credential_image;type:varchar(255);default:null;comment:资格证书" json:"credential_image"`
|
||||
Examine
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
type ManageAgentIDImage struct {
|
||||
}
|
||||
|
||||
func (m *ManageAgent) TableName() string {
|
||||
return "manage_agent"
|
||||
}
|
||||
@ -43,6 +47,16 @@ func (m *ManageAgent) SetKeywordAttribute(value []string) {
|
||||
m.Keyword = utils.AnyToJSON(value)
|
||||
}
|
||||
|
||||
func (m *ManageAgent) GetCredentialImageAttribute() []string {
|
||||
out := make([]string, 0)
|
||||
_ = utils.FromJSON(m.CredentialImage, &out)
|
||||
return out
|
||||
}
|
||||
|
||||
func (m *ManageAgent) SetCredentialImageAttribute(value []string) {
|
||||
m.CredentialImage = utils.AnyToJSON(value)
|
||||
}
|
||||
|
||||
func NewManageAgent() *ManageAgent {
|
||||
return &ManageAgent{}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ type ManageCompany struct {
|
||||
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
|
||||
Examine
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ type ManageExpert struct {
|
||||
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
|
||||
Examine
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ type ManageLaboratory struct {
|
||||
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
|
||||
Examine
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ type ManageResearch struct {
|
||||
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
|
||||
Examine
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ type SysPatent struct {
|
||||
Description string `gorm:"column:description;type:text;default:null;comment:摘要" json:"description"`
|
||||
PrincipalClaim string `gorm:"column:principal_claim;type:text;default:null;comment:主权项" json:"principal_claim"`
|
||||
IPCCode string `gorm:"column:ipc_code;type:varchar(50);default:null;comment:IPC主分类号" json:"ipc_code"`
|
||||
ShelfStatus
|
||||
Shelf
|
||||
Status SysParentStatus `gorm:"column:status;type:tinyint(1);default:1;comment:专利状态(1:授权,2:实审,3:公开)" json:"-"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
|
@ -25,7 +25,7 @@ type TechnologyInstance struct {
|
||||
Introduce string `gorm:"column:introduce;type:text;comment:介绍描述" json:"introduce"`
|
||||
Purpose string `gorm:"column:purpose;type:text;comment:意图-承担科研项目" json:"purpose"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:null;comment:备注信息" json:"remark"`
|
||||
ShelfStatus
|
||||
Shelf
|
||||
Status TechnologyInstanceStatus `gorm:"column:status;type:tinyint(1);default:0;comment:状态" json:"status"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
|
@ -21,7 +21,7 @@ type TechnologyProduct struct {
|
||||
CooperationMode config.TechnologyCooperationMode `gorm:"column:cooperation_mode;type:tinyint(1);default:0;comment:合作模式" json:"cooperation_mode"`
|
||||
Keyword string `gorm:"column:keyword;type:varchar(255);default:null;comment:关键词" json:"-"`
|
||||
Introduce string `gorm:"column:introduce;type:text;comment:介绍描述" json:"introduce"`
|
||||
ShelfStatus
|
||||
Shelf
|
||||
Status TechnologyProductStatus `gorm:"column:status;type:tinyint(1);default:0;comment:状态" json:"status"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
|
@ -15,7 +15,7 @@ type TechnologyProject struct {
|
||||
Director string `gorm:"column:director;type:varchar(100);default:null;comment:负责人" json:"director"`
|
||||
BeginAt time.Time `gorm:"column:begin_at;type:datetime;not null;comment:开始时间" json:"begin_at"`
|
||||
FinishAt time.Time `gorm:"column:finish_at;type:datetime;not null;comment:结束时间" json:"finish_at"`
|
||||
ShelfStatus
|
||||
Shelf
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
@ -9,8 +9,7 @@ import (
|
||||
// UserInstance 账号信息
|
||||
type UserInstance struct {
|
||||
Model
|
||||
Local
|
||||
UUID uint64 `gorm:"column:-;uniqueIndex:idx_tenant_user_uuid;type:int;default:0;comment:用户唯一UUID" json:"-"`
|
||||
UUID uint64 `gorm:"column:uuid;uniqueIndex:idx_tenant_user_uuid;type:int;default:0;comment:用户唯一UUID" json:"-"`
|
||||
Source UserInstanceSource `gorm:"column:source;type:tinyint(1);default:1;comment:账号来源" json:"source"`
|
||||
Name string `gorm:"column:name;type:varchar(20);default:null;comment:真实姓名" json:"name"`
|
||||
Mobile string `gorm:"column:mobile;index:idx_user_instance_mobile;type:varchar(15);default:null;comment:联系方式" json:"mobile"`
|
||||
|
Reference in New Issue
Block a user