adjust api get all project flock kandang with periode

This commit is contained in:
giovanni
2026-04-10 14:09:31 +07:00
parent ddcf13e2ff
commit 3d75251c96
5 changed files with 210 additions and 24 deletions
@@ -11,19 +11,20 @@ type Update struct {
}
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"`
ProjectFlockId uint `query:"project_flock_id" validate:"omitempty"`
KandangId uint `query:"kandang_id" validate:"omitempty"`
Category string `query:"category" validate:"omitempty,oneof=Growing Laying"`
AreaId uint `query:"area_id" validate:"omitempty"`
SortBy string `query:"sort_by" validate:"omitempty,oneof=created_at period"`
SortOrder string `query:"sort_order" validate:"omitempty,oneof=ASC DESC"`
StepName string `query:"step_name" validate:"omitempty,max=50"`
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"`
NameWithPeriode bool `query:"name_with_periode"`
ProjectFlockId uint `query:"project_flock_id" validate:"omitempty"`
KandangId uint `query:"kandang_id" validate:"omitempty"`
Category string `query:"category" validate:"omitempty,oneof=Growing Laying"`
AreaId uint `query:"area_id" validate:"omitempty"`
SortBy string `query:"sort_by" validate:"omitempty,oneof=created_at period"`
SortOrder string `query:"sort_order" validate:"omitempty,oneof=ASC DESC"`
StepName string `query:"step_name" validate:"omitempty,max=50"`
}
type Closing struct {
Action string `json:"action" validate:"required,oneof=close unclose"`
ClosedDate *string `json:"closed_date,omitempty"`
}
}