package vn.azteam.tpf.service.dto;

import java.time.Instant;
import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the TBSuppliesPriceHistory entity.
 */
public class TBSuppliesPriceHistoryDTO implements Serializable {

    private Long id;

    private Instant priceForm;

    private Double price;

    private Long tbSuppliesOrderId;

    private Long tbSuppliesInWarehouseId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Instant getPriceForm() {
        return priceForm;
    }

    public void setPriceForm(Instant priceForm) {
        this.priceForm = priceForm;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Long getTbSuppliesOrderId() {
        return tbSuppliesOrderId;
    }

    public void setTbSuppliesOrderId(Long tBSuppliesOrderId) {
        this.tbSuppliesOrderId = tBSuppliesOrderId;
    }

    public Long getTbSuppliesInWarehouseId() {
        return tbSuppliesInWarehouseId;
    }

    public void setTbSuppliesInWarehouseId(Long tBSuppliesInWarehouseId) {
        this.tbSuppliesInWarehouseId = tBSuppliesInWarehouseId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        TBSuppliesPriceHistoryDTO tBSuppliesPriceHistoryDTO = (TBSuppliesPriceHistoryDTO) o;
        if (tBSuppliesPriceHistoryDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), tBSuppliesPriceHistoryDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "TBSuppliesPriceHistoryDTO{" +
            "id=" + getId() +
            ", priceForm='" + getPriceForm() + "'" +
            ", price=" + getPrice() +
            ", tbSuppliesOrder=" + getTbSuppliesOrderId() +
            ", tbSuppliesInWarehouse=" + getTbSuppliesInWarehouseId() +
            "}";
    }
}
