add master data config checklist

This commit is contained in:
MacBook Air M1
2026-01-07 21:37:51 +07:00
parent c3f8ae5887
commit a4840fc98a
12 changed files with 537 additions and 13 deletions
@@ -0,0 +1,19 @@
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"`
}