Merge branch 'migration' of https://github.com/dikstub-rssa/simrs-be into feat/functional-position-100
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package adm_employee_hist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
"time"
|
||||
)
|
||||
|
||||
type AdmEmployeeHist struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
StartedAt *time.Time `json:"startedAt"`
|
||||
FinishedAt *time.Time `json:"finishedAt"`
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
type DivisionPosition struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Division_Id *uint16 `json:"division_id"`
|
||||
Division *ed.Division `json:"division" gorm:"foreignKey:Division_Id"`
|
||||
Division *ed.Division `json:"division" gorm:"foreignKey:Division_Id;references:Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package installation_position
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
)
|
||||
|
||||
type InstallationPosition struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Installation_Id *uint16 `json:"installation_id" gorm:"not null"`
|
||||
Installation *ei.Installation `json:"installation,omitempty" gorm:"foreignKey:Installation_Id;references:Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10;not null"`
|
||||
Name string `json:"name" gorm:"size:30;not null"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package responsible_doctor_hist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ResponsibleDoctorHist struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
StartedAt *time.Time `json:"startedAt"`
|
||||
FinishedAt *time.Time `json:"finishedAt"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package specialist_position
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type SpecialistPosition struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Specialist_Id *uint16 `json:"specialist_id" gorm:"not null"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10;not null"`
|
||||
Name string `json:"name" gorm:"size:30;not null"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package subspecialist_position
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
es "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
)
|
||||
|
||||
type SubspecialistPosition struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id" gorm:"not null"`
|
||||
Subspecialist *es.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10;not null"`
|
||||
Name string `json:"name" gorm:"size:30;not null"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package unit_position
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type UnitPosition struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Unit_Id *uint16 `json:"unit_id" gorm:"not null"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10;not null"`
|
||||
Name string `json:"name" gorm:"size:30;not null"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package migration
|
||||
|
||||
import (
|
||||
adime "simrs-vx/internal/domain/main-entities/adime"
|
||||
admemployeehist "simrs-vx/internal/domain/main-entities/adm-employee-hist"
|
||||
ambulancetransportreq "simrs-vx/internal/domain/main-entities/ambulance-transport-req"
|
||||
ambulatory "simrs-vx/internal/domain/main-entities/ambulatory"
|
||||
appointment "simrs-vx/internal/domain/main-entities/appointment"
|
||||
@@ -27,6 +28,7 @@ import (
|
||||
infra "simrs-vx/internal/domain/main-entities/infra"
|
||||
inpatient "simrs-vx/internal/domain/main-entities/inpatient"
|
||||
installation "simrs-vx/internal/domain/main-entities/installation"
|
||||
installationposition "simrs-vx/internal/domain/main-entities/installation-position"
|
||||
insurancecompany "simrs-vx/internal/domain/main-entities/insurance-company"
|
||||
intern "simrs-vx/internal/domain/main-entities/intern"
|
||||
internalreference "simrs-vx/internal/domain/main-entities/internal-reference"
|
||||
@@ -71,14 +73,18 @@ import (
|
||||
proceduresrc "simrs-vx/internal/domain/main-entities/procedure-src"
|
||||
province "simrs-vx/internal/domain/main-entities/province"
|
||||
regency "simrs-vx/internal/domain/main-entities/regency"
|
||||
responsibledoctorhist "simrs-vx/internal/domain/main-entities/responsible-doctor-hist"
|
||||
room "simrs-vx/internal/domain/main-entities/room"
|
||||
sbar "simrs-vx/internal/domain/main-entities/sbar"
|
||||
soapi "simrs-vx/internal/domain/main-entities/soapi"
|
||||
specialist "simrs-vx/internal/domain/main-entities/specialist"
|
||||
specialistintern "simrs-vx/internal/domain/main-entities/specialist-intern"
|
||||
specialistposition "simrs-vx/internal/domain/main-entities/specialist-position"
|
||||
subspecialist "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
subspecialistposition "simrs-vx/internal/domain/main-entities/subspecialist-position"
|
||||
therapyprotocol "simrs-vx/internal/domain/main-entities/therapy-protocol"
|
||||
unit "simrs-vx/internal/domain/main-entities/unit"
|
||||
unitposition "simrs-vx/internal/domain/main-entities/unit-position"
|
||||
uom "simrs-vx/internal/domain/main-entities/uom"
|
||||
user "simrs-vx/internal/domain/main-entities/user"
|
||||
vehicle "simrs-vx/internal/domain/main-entities/vehicle"
|
||||
@@ -179,5 +185,11 @@ func getMainEntities() []any {
|
||||
&eduassesment.EduAssessment{},
|
||||
&generalconsent.GeneralConsent{},
|
||||
&deathcause.DeathCause{},
|
||||
&installationposition.InstallationPosition{},
|
||||
&unitposition.UnitPosition{},
|
||||
&specialistposition.SpecialistPosition{},
|
||||
&subspecialistposition.SubspecialistPosition{},
|
||||
&responsibledoctorhist.ResponsibleDoctorHist{},
|
||||
&admemployeehist.AdmEmployeeHist{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user