package com.petshop.backend.dto.adoption;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.Objects;

public class AdoptionRequest {
    @NotNull(message = "Pet ID is required")
    private Long petId;

    @NotNull(message = "Customer ID is required")
    private Long customerId;

    @NotNull(message = "Adoption date is required")
    private LocalDate adoptionDate;

    @NotBlank(message = "Adoption status is required")
    private String adoptionStatus;

    private Long employeeId;

    @NotNull(message = "Source store ID is required")
    private Long sourceStoreId;

    private String paymentMethod;

    public Long getPetId() {
        return petId;
    }

    public void setPetId(Long petId) {
        this.petId = petId;
    }

    public Long getCustomerId() {
        return customerId;
    }

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

    public LocalDate getAdoptionDate() {
        return adoptionDate;
    }

    public void setAdoptionDate(LocalDate adoptionDate) {
        this.adoptionDate = adoptionDate;
    }

    public String getAdoptionStatus() {
        return adoptionStatus;
    }

    public void setAdoptionStatus(String adoptionStatus) {
        this.adoptionStatus = adoptionStatus;
    }

    public Long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
    }

    public Long getSourceStoreId() {
        return sourceStoreId;
    }

    public void setSourceStoreId(Long sourceStoreId) {
        this.sourceStoreId = sourceStoreId;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AdoptionRequest that = (AdoptionRequest) o;
        return Objects.equals(petId, that.petId) &&
                Objects.equals(customerId, that.customerId) &&
                Objects.equals(adoptionDate, that.adoptionDate) &&
                Objects.equals(adoptionStatus, that.adoptionStatus) &&
                Objects.equals(employeeId, that.employeeId) &&
                Objects.equals(sourceStoreId, that.sourceStoreId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(petId, customerId, adoptionDate, adoptionStatus, employeeId, sourceStoreId);
    }

    @Override
    public String toString() {
        return "AdoptionRequest{" +
                "petId=" + petId +
                ", customerId=" + customerId +
                ", adoptionDate=" + adoptionDate +
                ", adoptionStatus='" + adoptionStatus + '\'' +
                ", employeeId=" + employeeId +
                ", sourceStoreId=" + sourceStoreId +
                '}';
    }
}
