Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into fix/anything-moko
This commit is contained in:
@@ -2,20 +2,14 @@ package base
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
|
||||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
|
||||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Basic struct {
|
type Basic struct {
|
||||||
ecore.SmallMain // adjust this according to the needs
|
ecore.SmallMain // adjust this according to the needs
|
||||||
Infra_Id *uint16 `json:"infra_id"`
|
Infra_Id *uint16 `json:"infra_id"`
|
||||||
Unit_Id *uint16 `json:"unit_id"`
|
Unit_Id *uint16 `json:"unit_id"`
|
||||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
Specialist_Id *uint16 `json:"specialist_id"`
|
||||||
Specialist_Id *uint16 `json:"specialist_id"`
|
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
|
||||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
|
||||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Basic) TableName() string {
|
func (Basic) TableName() string {
|
||||||
|
|||||||
@@ -3,9 +3,15 @@ package room
|
|||||||
import (
|
import (
|
||||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||||
ebase "simrs-vx/internal/domain/main-entities/room/base"
|
ebase "simrs-vx/internal/domain/main-entities/room/base"
|
||||||
|
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||||
|
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||||
|
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Room struct {
|
type Room struct {
|
||||||
ebase.Basic
|
ebase.Basic
|
||||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id"`
|
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id"`
|
||||||
|
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
||||||
|
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
||||||
|
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user