admissionServer/basicModels.go
Marcel 8b9daa4f2c Dodano podstawowe modele i enumy
- Podstawowe modele reprezentujące tabele w DB zostały dodane;
- Podstawowe enumy zostały dodane
2018-11-25 12:46:45 +01:00

69 lines
1.2 KiB
Go

package main
import "time"
type patient struct {
Pesel string
Name string
Surname string
BirthDate time.Time
PatientState patientStates
PatientSex sex
PatientEmail string
}
type diagnosis struct {
IcdSymbol string
Name string
FieldOfSurgery surgeryField
Description string
}
type doctor struct {
DoctorID int
Name string
Surname string
AcademicDegree academicDegree
Specialization specialization
DateOfEmployment time.Time
JobPosition jobPosition
}
type operation struct {
OperationID int
Name string
averageTime time.Time
operationType operationTypes
cost float32
refoundation int
}
type room struct {
RoomNumber int
NumberOfBeds int
IncrasedCare bool
}
type admission struct {
AdmissionID int
AdmissionDate time.Time
EndDate time.Time
PatientPesel string
DiagnosisSymbol string
MainDoctor int
PlanedOperation int
RoomNumber int
IsPlanned bool
}
func (p patient) showPatient() string {
return p.Pesel
}
type patients []patient
type doctors []doctor
type diagnoses []diagnosis
type admissions []admission
type operations []operation
type rooms []room