package validation

type Create struct {
	PartyType          string  `json:"party_type" validate:"required_strict,min=1,max=50"`
	PartyId            uint    `json:"party_id" validate:"required_strict,number,gt=0"`
	PartyAccountNumber *string `json:"party_account_number"`
	PaymentDate        string  `json:"payment_date" validate:"required_strict,datetime=2006-01-02"`
	Nominal            float64 `json:"nominal" validate:"required_strict"`
	ReferenceNumber    *string `json:"reference_number,omitempty"`
	PaymentMethod      string  `json:"payment_method" validate:"required_strict,max=20"`
	BankId             *uint   `json:"bank_id" validate:"omitempty,number,gt=0"`
	Notes              string  `json:"notes" 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"`
	PartyAccountNumber *string `json:"party_account_number,omitempty"`
	PaymentDate        *string  `json:"payment_date,omitempty" validate:"omitempty,datetime=2006-01-02"`
	Nominal            *float64 `json:"nominal,omitempty" validate:"omitempty,gt=0"`
	ReferenceNumber    *string  `json:"reference_number,omitempty"`
	PaymentMethod      *string  `json:"payment_method,omitempty" validate:"omitempty,max=20"`
	BankId             *uint    `json:"bank_id,omitempty" validate:"omitempty,number,gt=0"`
	Notes              *string  `json:"notes,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"`
}
