feat:完善信息

This commit is contained in:
henry
2021-10-15 15:06:02 +08:00
parent af8691e943
commit ae9fb8ea0f
86 changed files with 215 additions and 216 deletions

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type ManageCompany struct {
*model.ManageCompany
}
func NewManageCompany() *ManageCompany {
return &ManageCompany{}
}

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type ManageExpert struct {
*model.ManageExpert
}
func NewManageExpert() *ManageExpert {
return &ManageExpert{model.NewManageExpert()}
}

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type ManageLaboratory struct {
*model.ManageLaboratory
}
func NewManageLaboratory() *ManageLaboratory {
return &ManageLaboratory{model.NewManageLaboratory()}
}

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type ManageResearch struct {
*model.ManageResearch
}
func NewManageResearch() *ManageResearch {
return &ManageResearch{model.NewManageResearch()}
}

View 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()}
}

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type SysTenant struct {
*model.SysTenant
}
func NewSysTenant() *SysTenant {
return &SysTenant{model.NewSysTenant()}
}

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type TechnologyDemand struct {
*model.TechnologyDemand
}
func NewTechnologyDemand() *TechnologyDemand {
return &TechnologyDemand{model.NewTechnologyDemand()}
}

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type TechnologyInstance struct {
*model.TechnologyInstance
}
func NewTechnologyInstance() *TechnologyInstance {
return &TechnologyInstance{model.NewTechnologyInstance()}
}

View File

@ -0,0 +1,13 @@
package model
import (
"SciencesServer/app/common/model"
)
type TechnologyPaper struct {
*model.TechnologyPaper
}
func NewTechnologyPaper() *TechnologyPaper {
return &TechnologyPaper{model.NewTechnologyPaper()}
}

View 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()}
}

View 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()}
}

View 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()}
}

View File

@ -0,0 +1,11 @@
package model
import "SciencesServer/app/common/model"
type UserManageBank struct {
*model.UserManageBank
}
func NewUserManageBank() *UserManageBank {
return &UserManageBank{model.NewUserManageBank()}
}