package com.petshop.backend.dto.supplier;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import java.util.Objects;

public class SupplierRequest {
    @NotBlank(message = "Supplier company is required")
    private String supCompany;

    private String supContactFirstName;

    private String supContactLastName;

    @Email(message = "Invalid email format")
    private String supEmail;

    private String supPhone;

    public String getSupCompany() {
        return supCompany;
    }

    public void setSupCompany(String supCompany) {
        this.supCompany = supCompany;
    }

    public String getSupContactFirstName() {
        return supContactFirstName;
    }

    public void setSupContactFirstName(String supContactFirstName) {
        this.supContactFirstName = supContactFirstName;
    }

    public String getSupContactLastName() {
        return supContactLastName;
    }

    public void setSupContactLastName(String supContactLastName) {
        this.supContactLastName = supContactLastName;
    }

    public String getSupEmail() {
        return supEmail;
    }

    public void setSupEmail(String supEmail) {
        this.supEmail = supEmail;
    }

    public String getSupPhone() {
        return supPhone;
    }

    public void setSupPhone(String supPhone) {
        this.supPhone = supPhone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SupplierRequest that = (SupplierRequest) o;
        return Objects.equals(supCompany, that.supCompany) &&
                Objects.equals(supContactFirstName, that.supContactFirstName) &&
                Objects.equals(supContactLastName, that.supContactLastName) &&
                Objects.equals(supEmail, that.supEmail) &&
                Objects.equals(supPhone, that.supPhone);
    }

    @Override
    public int hashCode() {
        return Objects.hash(supCompany, supContactFirstName, supContactLastName, supEmail, supPhone);
    }

    @Override
    public String toString() {
        return "SupplierRequest{" +
                "supCompany='" + supCompany + '\'' +
                ", supContactFirstName='" + supContactFirstName + '\'' +
                ", supContactLastName='" + supContactLastName + '\'' +
                ", supEmail='" + supEmail + '\'' +
                ", supPhone='" + supPhone + '\'' +
                '}';
    }
}
