mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
20 lines
827 B
Go
20 lines
827 B
Go
package validation
|
|
|
|
type Create struct {
|
|
Date string `json:"date" validate:"required"`
|
|
PercentageThresholdBad int `json:"percentage_threshold_bad" validate:"required"`
|
|
PercentageThresholdEnough int `json:"percentage_threshold_enough" validate:"required"`
|
|
}
|
|
|
|
type Update struct {
|
|
Date *string `json:"date,omitempty" validate:"omitempty"`
|
|
PercentageThresholdBad *int `json:"percentage_threshold_bad,omitempty" validate:"omitempty"`
|
|
PercentageThresholdEnough *int `json:"percentage_threshold_enough,omitempty" validate:"omitempty"`
|
|
}
|
|
|
|
type Query struct {
|
|
Page int `query:"page" validate:"omitempty,number,min=1,gt=0"`
|
|
Limit int `query:"limit" validate:"omitempty,number,min=1,max=100,gt=0"`
|
|
Search string `query:"search" validate:"omitempty,max=50"`
|
|
}
|