- CreateSchema =
Dry::Schema.Params do
required(:fname).filled(:string)
required(:lname).filled(:string)
required(:email).filled(Types::Email)
optional(:locale).filled(:string)
optional(:mobile).filled(:string)
optional(:gender).filled(Types::Gender)
optional(:ssn).filled(Types::Ssn)
end
- UpdateSchema =
Dry::Schema.Params do
optional(:fname).filled(:string)
optional(:lname).filled(:string)
optional(:email).filled(Types::Email)
optional(:locale).filled(:string)
optional(:mobile).filled(:string)
optional(:gender).filled(Types::Gender)
optional(:ssn).filled(Types::Ssn)
end
- FilterSchema =
Dry::Schema.Params do
optional(:page)
optional(:per_page)
optional(:email_eq).filled(Types::Email)
optional(:fname_eq).filled(:string)
optional(:lname_eq).filled(:string)
end
- OBJECT_NAME =
:candidate