package requests

// CreateContractorRequest represents the request to create a contractor
type CreateContractorRequest struct {
	ResidenceID   *uint    `json:"residence_id"`
	Name          string   `json:"name" validate:"required,min=1,max=200"`
	Company       string   `json:"company" validate:"max=200"`
	Phone         string   `json:"phone" validate:"max=20"`
	Email         string   `json:"email" validate:"omitempty,email,max=254"`
	Website       string   `json:"website" validate:"max=200"`
	Notes         string   `json:"notes" validate:"max=10000"`
	StreetAddress string   `json:"street_address" validate:"max=255"`
	City          string   `json:"city" validate:"max=100"`
	StateProvince string   `json:"state_province" validate:"max=100"`
	PostalCode    string   `json:"postal_code" validate:"max=20"`
	SpecialtyIDs  []uint   `json:"specialty_ids" validate:"omitempty,max=20"`
	Rating        *float64 `json:"rating" validate:"omitempty,min=0,max=5"`
	IsFavorite    *bool    `json:"is_favorite"`
}

// UpdateContractorRequest represents the request to update a contractor
type UpdateContractorRequest struct {
	Name          *string  `json:"name" validate:"omitempty,min=1,max=200"`
	Company       *string  `json:"company" validate:"omitempty,max=200"`
	Phone         *string  `json:"phone" validate:"omitempty,max=20"`
	Email         *string  `json:"email" validate:"omitempty,email,max=254"`
	Website       *string  `json:"website" validate:"omitempty,max=200"`
	Notes         *string  `json:"notes" validate:"omitempty,max=10000"`
	StreetAddress *string  `json:"street_address" validate:"omitempty,max=255"`
	City          *string  `json:"city" validate:"omitempty,max=100"`
	StateProvince *string  `json:"state_province" validate:"omitempty,max=100"`
	PostalCode    *string  `json:"postal_code" validate:"omitempty,max=20"`
	SpecialtyIDs  []uint   `json:"specialty_ids" validate:"omitempty,max=20"`
	Rating        *float64 `json:"rating" validate:"omitempty,min=0,max=5"`
	IsFavorite    *bool    `json:"is_favorite"`
	ResidenceID    *uint    `json:"residence_id"`
}
