add validator

This commit is contained in:
kandrusyak
2023-08-02 01:51:27 +03:00
parent c55df47ada
commit 3a514800e6
6 changed files with 59 additions and 32 deletions

View File

@@ -21,8 +21,8 @@ type Event struct {
}
type CreateEvent struct {
Start time.Time `json:"start"`
End time.Time `json:"end"`
Person PersonalInformation `json:"person"`
MedicId uuid.UUID `json:"medic_id"`
Start time.Time `json:"start" validate:"required,datetime"`
End time.Time `json:"end" validate:"required,datetime"`
Person PersonalInformation `json:"person" validate:"required"`
MedicId uuid.UUID `json:"medic_id" validate:"required"`
}