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"`
	TransactionTypes []string `query:"transaction_types" validate:"omitempty,dive,max=50"`
	BankIDs          []uint   `query:"bank_ids" validate:"omitempty,dive,gt=0"`
	CustomerIDs      []uint   `query:"customer_ids" validate:"omitempty,dive,gt=0"`
	SupplierIDs      []uint   `query:"supplier_ids" validate:"omitempty,dive,gt=0"`
	SortDate         string   `query:"sort_date" validate:"omitempty,oneof=created_at payment_date"`
	StartDate        string   `query:"start_date" validate:"omitempty,datetime=2006-01-02"`
	EndDate          string   `query:"end_date" validate:"omitempty,datetime=2006-01-02"`
}
