update person models
This commit is contained in:
@@ -9,16 +9,16 @@ import (
|
||||
// swagger:model Event
|
||||
type Event struct {
|
||||
gorm.Model `json:"meta"`
|
||||
ID uuid.UUID `json:"id" gorm:"type:uuid;default:gen_random_uuid();primarykey"`
|
||||
Start time.Time `json:"start"`
|
||||
End time.Time `json:"end"`
|
||||
Author User `json:"author" gorm:"-"`
|
||||
AuthorId uuid.UUID `json:"-"`
|
||||
Medic User `json:"medic" gorm:"-"`
|
||||
MedicId uuid.UUID `json:"-"`
|
||||
Person PersonalInformation `json:"person" gorm:"-"`
|
||||
PersonId uuid.UUID `json:"-"`
|
||||
OrgId uuid.UUID `json:"-"`
|
||||
ID uuid.UUID `json:"id" gorm:"type:uuid;default:gen_random_uuid();primarykey"`
|
||||
Start time.Time `json:"start"`
|
||||
End time.Time `json:"end"`
|
||||
Author User `json:"author" gorm:"-"`
|
||||
AuthorId uuid.UUID `json:"-"`
|
||||
Medic User `json:"medic" gorm:"-"`
|
||||
MedicId uuid.UUID `json:"-"`
|
||||
Person *PersonalInformationApi `json:"person" gorm:"-"`
|
||||
PersonId uuid.UUID `json:"-"`
|
||||
OrgId uuid.UUID `json:"-"`
|
||||
}
|
||||
|
||||
// swagger:model CreateEvent
|
||||
|
||||
@@ -21,10 +21,12 @@ type PersonalInformation struct {
|
||||
Phone string `json:"phone,omitempty" validate:"required_without=ID"`
|
||||
}
|
||||
|
||||
type PersonalInformationCreate struct {
|
||||
type PersonalInformationApi struct {
|
||||
ID uuid.UUID `json:"id,omitempty"`
|
||||
FirstName string `json:"first_name,omitempty"`
|
||||
LastName string `json:"last_name,omitempty"`
|
||||
Patronymic string `json:"patronymic,omitempty"`
|
||||
BirthDate string `json:"birth_date,omitempty"`
|
||||
Contacts []Contact `json:"contacts"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user