package validation

type Create struct {
	PartyType          string  `json:"party_type" validate:"required_strict,max=50"`
	PartyId            uint    `json:"party_id" validate:"required_strict,number,gt=0"`
	BankId             *uint   `json:"bank_id,omitempty" validate:"omitempty,number,gt=0"`
	ReferenceNumber    string  `json:"reference_number" validate:"required_strict,max=100"`
	InitialBalanceType string  `json:"initial_balance_type" validate:"required_strict,oneof=NEGATIVE POSITIVE"`
	Nominal            float64 `json:"nominal" validate:"required_strict,gt=0"`
	Note               string  `json:"note" validate:"required_strict,max=500"`
}

type Update struct {
	PartyType          *string  `json:"party_type,omitempty" validate:"omitempty,max=50"`
	PartyId            *uint    `json:"party_id,omitempty" validate:"omitempty,number,gt=0"`
	BankId             *uint    `json:"bank_id,omitempty" validate:"omitempty,number,gt=0"`
	ReferenceNumber    *string  `json:"reference_number,omitempty" validate:"omitempty,max=100"`
	InitialBalanceType *string  `json:"initial_balance_type,omitempty" validate:"omitempty,oneof=NEGATIVE POSITIVE"`
	Nominal            *float64 `json:"nominal,omitempty" validate:"omitempty,gt=0"`
	Note               *string  `json:"note,omitempty" validate:"omitempty,max=500"`
}

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"`
}
