package validation

type Create struct {
	ProjectFlockKandangId uint                 `json:"project_flock_kandang_id" validate:"required,number,min=1"`
	ChickinRequests       []ChickinRequestItem `json:"chickin_requests" validate:"required,min=1,dive"`
}

type ChickinRequestItem struct {
	ChickInDate        string `json:"chick_in_date" validate:"required,datetime=2006-01-02"`
	ProductWarehouseId uint   `json:"product_warehouse_id" validate:"required,number,min=1"`
	Note               string `json:"note" validate:"omitempty"`
}

type Update struct {
	ChickInDate string `json:"chick_in_date" validate:"required,datetime=2006-01-02"`
	Note        string `json:"note" validate:"omitempty"`
}

type Query struct {
	Page                  int  `query:"page" validate:"omitempty,number,min=1"`
	Limit                 int  `query:"limit" validate:"omitempty,number,min=1,max=100"`
	ProjectFlockKandangId uint `query:"project_flock_kandang_id" validate:"omitempty,number,min=1"`
}

type Approve struct {
	Action        string  `json:"action" validate:"required_strict"`
	ApprovableIds []uint  `json:"approvable_ids" validate:"required_strict,min=1,dive,gt=0"`
	Notes         *string `json:"notes,omitempty" validate:"omitempty,max=500"`
}
