diff --git a/basicModels.go b/basicModels.go index bf095b5..5a16406 100644 --- a/basicModels.go +++ b/basicModels.go @@ -10,7 +10,7 @@ type patient struct { Name string Surname string BirthDate time.Time - PatientState patientStates + PatientState sql.NullString PatientSex sex PatientEmail string } @@ -37,7 +37,7 @@ type operation struct { Name string averageTime string operationType operationTypes - cost []uint8 + cost uint8 refoundation int64 } @@ -48,14 +48,14 @@ type room struct { } type admission struct { - AdmissionID int + AdmissionID int64 AdmissionDate time.Time EndDate time.Time PatientPesel string DiagnosisSymbol string - MainDoctor int - PlanedOperation int - RoomNumber int + MainDoctor int64 + PlanedOperation int64 + RoomNumber int64 IsPlanned bool } @@ -70,7 +70,10 @@ type admissions []admission type operations []operation type rooms []room -type iDatabaseModel interface{} +type iDatabaseModel interface { + getPrimaryKey() string + getPrimaryKeyName() string +} type iDatabaseModels []iDatabaseModel type iStoreModels interface { readModels(rows *sql.Rows) iDatabaseModels