package validation

type Create struct {
	Name          string `json:"name" validate:"required_strict,min=3,max=50"`
	PicId         uint   `json:"pic_id" validate:"required_strict,number,gt=0"`
	Type          string `json:"type" validate:"required_strict,max=50"`
	Address       string `json:"address" validate:"required_strict"`
	Phone         string `json:"phone" validate:"required_strict,max=20"`
	Email         string `json:"email" validate:"required_strict,email,max=50"`
	AccountNumber string `json:"account_number" validate:"required_strict,max=50"`
}

type Update struct {
	Name          *string `json:"name,omitempty" validate:"omitempty,max=50"`
	PicId         *uint   `json:"pic_id,omitempty" validate:"omitempty,number,gt=0"`
	Type          *string `json:"type,omitempty" validate:"omitempty,max=50"`
	Address       *string `json:"address,omitempty" validate:"omitempty"`
	Phone         *string `json:"phone,omitempty" validate:"omitempty,max=20"`
	Email         *string `json:"email,omitempty" validate:"omitempty,max=50"`
	AccountNumber *string `json:"account_number,omitempty" validate:"omitempty,max=50"`
}

type Query struct {
	Page         int    `query:"page" validate:"omitempty,number,min=1"`
	Limit        int    `query:"limit" validate:"omitempty,number,min=1,max=100"`
	Search       string `query:"search" validate:"omitempty,max=50"`
	HasMarketing *bool  `query:"has_marketing" validate:"omitempty"`
}
