Files
astra-events/model/pd.go
kandrusyak fe09a32bbc add swagger
2023-08-02 22:49:48 +03:00

35 lines
1.1 KiB
Go

package model
import "github.com/google/uuid"
// swagger:model PersonalInformation
type PersonalInformation struct {
// The UUID of a person
// example: 6204037c-30e6-408b-8aaa-dd8219860b4b
ID uuid.UUID `json:"id,omitempty" validate:"required_without_all=FirstName LastName Patronymic Phone"`
// The first name of a person
// example: Иван
FirstName string `json:"first_name,omitempty" validate:"required_without=ID"`
// The last name of a person
// example: Иванов
LastName string `json:"last_name,omitempty" validate:"required_without=ID"`
// The patronymic of a person
// example: Иванович
Patronymic string `json:"patronymic,omitempty" validate:"required_without=ID"`
// The first name of a person
// example: 79206321370
Phone string `json:"phone,omitempty" validate:"required_without=ID"`
}
type PersonalInformationCreate struct {
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Patronymic string `json:"patronymic,omitempty"`
Contacts []Contact `json:"contacts"`
}
type Contact struct {
Category string `json:"category"`
Value string `json:"value"`
}