feat:优化项目结构
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
"SciencesServer/app/api/manage/controller"
|
||||
"SciencesServer/app/basic/config"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/utils"
|
||||
"errors"
|
||||
"time"
|
||||
@ -13,11 +13,11 @@ import (
|
||||
|
||||
// Demand 技术需求管理
|
||||
type Demand struct {
|
||||
*service.SessionEnterprise
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type DemandHandle func(enterprise *service.SessionEnterprise, local string) *Demand
|
||||
type DemandHandle func(session *session.Enterprise, local string) *Demand
|
||||
|
||||
type (
|
||||
// DemandInfo 需求信息
|
||||
@ -182,7 +182,7 @@ func (c *Demand) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewDemand() DemandHandle {
|
||||
return func(enterprise *service.SessionEnterprise, local string) *Demand {
|
||||
return &Demand{SessionEnterprise: enterprise, local: local}
|
||||
return func(session *session.Enterprise, local string) *Demand {
|
||||
return &Demand{Enterprise: session, local: local}
|
||||
}
|
||||
}
|
||||
|
@ -4,16 +4,16 @@ import (
|
||||
"SciencesServer/app/api/enterprise/model"
|
||||
"SciencesServer/app/api/manage/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"errors"
|
||||
)
|
||||
|
||||
type Equipment struct {
|
||||
*service.SessionEnterprise
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type EquipmentHandle func(enterprise *service.SessionEnterprise, local string) *Equipment
|
||||
type EquipmentHandle func(session *session.Enterprise, local string) *Equipment
|
||||
|
||||
type EquipmentParams struct {
|
||||
ID uint64
|
||||
@ -102,10 +102,10 @@ func (c *Equipment) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewEquipment() EquipmentHandle {
|
||||
return func(enterprise *service.SessionEnterprise, local string) *Equipment {
|
||||
return func(session *session.Enterprise, local string) *Equipment {
|
||||
return &Equipment{
|
||||
SessionEnterprise: enterprise,
|
||||
local: local,
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,18 +4,18 @@ import (
|
||||
"SciencesServer/app/api/enterprise/model"
|
||||
"SciencesServer/app/api/manage/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Instance 技术管理
|
||||
type Instance struct {
|
||||
*service.SessionEnterprise
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type InstanceHandle func(enterprise *service.SessionEnterprise, local string) *Instance
|
||||
type InstanceHandle func(session *session.Enterprise, local string) *Instance
|
||||
|
||||
type (
|
||||
// InstanceInfo 详细信息
|
||||
@ -157,7 +157,7 @@ func (c *Instance) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewInstance() InstanceHandle {
|
||||
return func(enterprise *service.SessionEnterprise, local string) *Instance {
|
||||
return &Instance{SessionEnterprise: enterprise, local: local}
|
||||
return func(session *session.Enterprise, local string) *Instance {
|
||||
return &Instance{Enterprise: session, local: local}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"SciencesServer/app/api/enterprise/model"
|
||||
"SciencesServer/app/api/manage/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/utils"
|
||||
"errors"
|
||||
"time"
|
||||
@ -12,11 +12,11 @@ import (
|
||||
|
||||
// Paper 论文管理
|
||||
type Paper struct {
|
||||
*service.SessionEnterprise
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type PaperHandle func(enterprise *service.SessionEnterprise, local string) *Paper
|
||||
type PaperHandle func(session *session.Enterprise, local string) *Paper
|
||||
|
||||
type (
|
||||
PaperInfo struct {
|
||||
@ -113,7 +113,7 @@ func (c *Paper) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewPaper() PaperHandle {
|
||||
return func(enterprise *service.SessionEnterprise, local string) *Paper {
|
||||
return &Paper{SessionEnterprise: enterprise, local: local}
|
||||
return func(session *session.Enterprise, local string) *Paper {
|
||||
return &Paper{Enterprise: session, local: local}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"SciencesServer/app/api/enterprise/model"
|
||||
"SciencesServer/app/api/manage/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/utils"
|
||||
"errors"
|
||||
"time"
|
||||
@ -12,11 +12,11 @@ import (
|
||||
|
||||
// Patent 专利管理
|
||||
type Patent struct {
|
||||
*service.SessionEnterprise
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type PatentHandle func(enterprise *service.SessionEnterprise, local string) *Patent
|
||||
type PatentHandle func(session *session.Enterprise, local string) *Patent
|
||||
|
||||
type (
|
||||
// PatentInfo 专利信息
|
||||
@ -148,7 +148,7 @@ func (c *Patent) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewPatent() PatentHandle {
|
||||
return func(enterprise *service.SessionEnterprise, local string) *Patent {
|
||||
return &Patent{SessionEnterprise: enterprise, local: local}
|
||||
return func(session *session.Enterprise, local string) *Patent {
|
||||
return &Patent{Enterprise: session, local: local}
|
||||
}
|
||||
}
|
||||
|
@ -4,18 +4,18 @@ import (
|
||||
"SciencesServer/app/api/enterprise/model"
|
||||
"SciencesServer/app/api/manage/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/utils"
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Topic struct {
|
||||
*service.SessionEnterprise
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type TopicHandle func(enterprise *service.SessionEnterprise, local string) *Topic
|
||||
type TopicHandle func(session *session.Enterprise, local string) *Topic
|
||||
|
||||
type (
|
||||
// TopicInfo 课题信息
|
||||
@ -146,10 +146,10 @@ func (c *Topic) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewTopic() TopicHandle {
|
||||
return func(enterprise *service.SessionEnterprise, local string) *Topic {
|
||||
return func(session *session.Enterprise, local string) *Topic {
|
||||
return &Topic{
|
||||
SessionEnterprise: enterprise,
|
||||
local: local,
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user