package validation

type Create struct {
	Name string `json:"name" validate:"required_strict,min=3"`
}

type Update struct {
	Name *string `json:"name,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"`
	ProjectStatus *int   `query:"project_status" validate:"omitempty,oneof=1 2"`
	LocationID    *uint  `query:"location_id" validate:"omitempty,gt=0"`
}

const (
	SapronakTypeIncoming = "incoming"
	SapronakTypeOutgoing = "outgoing"
)

type ClosingSapronakQuery struct {
	Type      string `query:"type" validate:"required,oneof=incoming outgoing"`
	Page      int    `query:"page" validate:"omitempty,number,min=1,gt=0"`
	Limit     int    `query:"limit" validate:"omitempty,number,min=1,max=100,gt=0"`
	KandangID *uint  `query:"kandang_id" validate:"omitempty,gt=0"`
	Search    string `query:"search" validate:"omitempty,max=100"`
}
