feat:完善信息
This commit is contained in:
11
app/api/enterprise/model/manage_company.go
Normal file
11
app/api/enterprise/model/manage_company.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type ManageCompany struct {
|
||||
*model.ManageCompany
|
||||
}
|
||||
|
||||
func NewManageCompany() *ManageCompany {
|
||||
return &ManageCompany{}
|
||||
}
|
11
app/api/enterprise/model/manage_expert.go
Normal file
11
app/api/enterprise/model/manage_expert.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type ManageExpert struct {
|
||||
*model.ManageExpert
|
||||
}
|
||||
|
||||
func NewManageExpert() *ManageExpert {
|
||||
return &ManageExpert{model.NewManageExpert()}
|
||||
}
|
11
app/api/enterprise/model/manage_laboratory.go
Normal file
11
app/api/enterprise/model/manage_laboratory.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type ManageLaboratory struct {
|
||||
*model.ManageLaboratory
|
||||
}
|
||||
|
||||
func NewManageLaboratory() *ManageLaboratory {
|
||||
return &ManageLaboratory{model.NewManageLaboratory()}
|
||||
}
|
11
app/api/enterprise/model/manage_research.go
Normal file
11
app/api/enterprise/model/manage_research.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type ManageResearch struct {
|
||||
*model.ManageResearch
|
||||
}
|
||||
|
||||
func NewManageResearch() *ManageResearch {
|
||||
return &ManageResearch{model.NewManageResearch()}
|
||||
}
|
11
app/api/enterprise/model/sys_industry.go
Normal file
11
app/api/enterprise/model/sys_industry.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type SysIndustry struct {
|
||||
*model.SysIndustry
|
||||
}
|
||||
|
||||
func NewSysIndustry() *SysIndustry {
|
||||
return &SysIndustry{SysIndustry: model.NewSysIndustry()}
|
||||
}
|
11
app/api/enterprise/model/sys_tenant.go
Normal file
11
app/api/enterprise/model/sys_tenant.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type SysTenant struct {
|
||||
*model.SysTenant
|
||||
}
|
||||
|
||||
func NewSysTenant() *SysTenant {
|
||||
return &SysTenant{model.NewSysTenant()}
|
||||
}
|
11
app/api/enterprise/model/technology_demand.go
Normal file
11
app/api/enterprise/model/technology_demand.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type TechnologyDemand struct {
|
||||
*model.TechnologyDemand
|
||||
}
|
||||
|
||||
func NewTechnologyDemand() *TechnologyDemand {
|
||||
return &TechnologyDemand{model.NewTechnologyDemand()}
|
||||
}
|
11
app/api/enterprise/model/technology_instance.go
Normal file
11
app/api/enterprise/model/technology_instance.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type TechnologyInstance struct {
|
||||
*model.TechnologyInstance
|
||||
}
|
||||
|
||||
func NewTechnologyInstance() *TechnologyInstance {
|
||||
return &TechnologyInstance{model.NewTechnologyInstance()}
|
||||
}
|
13
app/api/enterprise/model/technology_paper.go
Normal file
13
app/api/enterprise/model/technology_paper.go
Normal file
@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"SciencesServer/app/common/model"
|
||||
)
|
||||
|
||||
type TechnologyPaper struct {
|
||||
*model.TechnologyPaper
|
||||
}
|
||||
|
||||
func NewTechnologyPaper() *TechnologyPaper {
|
||||
return &TechnologyPaper{model.NewTechnologyPaper()}
|
||||
}
|
11
app/api/enterprise/model/technology_patent.go
Normal file
11
app/api/enterprise/model/technology_patent.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type TechnologyPatent struct {
|
||||
*model.TechnologyPatent
|
||||
}
|
||||
|
||||
func NewTechnologyPatent() *TechnologyPatent {
|
||||
return &TechnologyPatent{TechnologyPatent: model.NewTechnologyPatent()}
|
||||
}
|
20
app/api/enterprise/model/user_instance.go
Normal file
20
app/api/enterprise/model/user_instance.go
Normal file
@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"SciencesServer/app/common/model"
|
||||
"SciencesServer/utils"
|
||||
)
|
||||
|
||||
type UserInstance struct{ *model.UserInstance }
|
||||
|
||||
func (m *UserInstance) UUIDToString() string {
|
||||
return utils.UintToString(m.UUID)
|
||||
}
|
||||
|
||||
func (m *UserInstance) ValidatePassword(password string) bool {
|
||||
return utils.HashCompare([]byte(m.Password), []byte(utils.Md5String(password, m.Salt)))
|
||||
}
|
||||
|
||||
func NewUserInstance() *UserInstance {
|
||||
return &UserInstance{UserInstance: model.NewUserInstance()}
|
||||
}
|
21
app/api/enterprise/model/user_manage.go
Normal file
21
app/api/enterprise/model/user_manage.go
Normal file
@ -0,0 +1,21 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"SciencesServer/app/common/model"
|
||||
)
|
||||
|
||||
type UserManage struct {
|
||||
*model.UserManage
|
||||
}
|
||||
|
||||
// LastChooseInfo 最后一次选中的信息
|
||||
func (m *UserManage) LastChooseInfo(uid uint64) error {
|
||||
_, err := model.FirstField(m.UserManage, []string{"id", "tenant_id", "uuid", "identity"},
|
||||
model.NewWhere("uid", uid),
|
||||
model.NewWhere("selected", model.UserManageSelectedForYes))
|
||||
return err
|
||||
}
|
||||
|
||||
func NewUserManage() *UserManage {
|
||||
return &UserManage{UserManage: model.NewUserManage()}
|
||||
}
|
11
app/api/enterprise/model/user_manage_bank.go
Normal file
11
app/api/enterprise/model/user_manage_bank.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type UserManageBank struct {
|
||||
*model.UserManageBank
|
||||
}
|
||||
|
||||
func NewUserManageBank() *UserManageBank {
|
||||
return &UserManageBank{model.NewUserManageBank()}
|
||||
}
|
Reference in New Issue
Block a user