package com.petshop.backend.dto.pet;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import java.math.BigDecimal;
import java.util.Objects;

public class PetRequest {
    @NotBlank(message = "Pet name is required")
    private String petName;

    @NotBlank(message = "Species is required")
    private String petSpecies;

    private String petBreed;

    @Positive(message = "Age must be positive")
    private Integer petAge;

    @NotNull(message = "Status is required")
    private String petStatus;

    private BigDecimal petPrice;

    private Long customerId;

    private Long storeId;

    public String getPetName() {
        return petName;
    }

    public void setPetName(String petName) {
        this.petName = petName;
    }

    public String getPetSpecies() {
        return petSpecies;
    }

    public void setPetSpecies(String petSpecies) {
        this.petSpecies = petSpecies;
    }

    public String getPetBreed() {
        return petBreed;
    }

    public void setPetBreed(String petBreed) {
        this.petBreed = petBreed;
    }

    public Integer getPetAge() {
        return petAge;
    }

    public void setPetAge(Integer petAge) {
        this.petAge = petAge;
    }

    public String getPetStatus() {
        return petStatus;
    }

    public void setPetStatus(String petStatus) {
        this.petStatus = petStatus;
    }

    public BigDecimal getPetPrice() {
        return petPrice;
    }

    public void setPetPrice(BigDecimal petPrice) {
        this.petPrice = petPrice;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PetRequest that = (PetRequest) o;
        return Objects.equals(petName, that.petName) &&
                Objects.equals(petSpecies, that.petSpecies) &&
                Objects.equals(petBreed, that.petBreed) &&
                Objects.equals(petAge, that.petAge) &&
                Objects.equals(petStatus, that.petStatus) &&
                Objects.equals(petPrice, that.petPrice);
    }

    @Override
    public int hashCode() {
        return Objects.hash(petName, petSpecies, petBreed, petAge, petStatus, petPrice);
    }

    @Override
    public String toString() {
        return "PetRequest{" +
                "petName='" + petName + '\'' +
                ", petSpecies='" + petSpecies + '\'' +
                ", petBreed='" + petBreed + '\'' +
                ", petAge=" + petAge +
                ", petStatus=" + petStatus +
                ", petPrice=" + petPrice +
                '}';
    }
}
