package vn.azteam.tpf.service.dto;

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

/**
 * A DTO for the TBEntity entity.
 */
public class TBEntityDTO implements Serializable {

    private Long id;

    private String qrCode;

    private String name;

    private Double areaM2;

    private Integer level;

    private String status;

    private Instant createdDate;

    private Instant modifiedDate;

    private Instant deletedDate;

    private Long parentId;

    private Long tbAddressId;

    private Long createdById;

    private Long modifiedById;

    private Long deletedById;

    private Long tbCustomerId;

    private Long tbEntityTypeId;

    private Integer color;

    private List<TBDetailUserDTO> detailUserDTOS;

    private List<TBCropDTO> tbCropDTOS;

    private Long totalDevice;

    public Long getId() {
        return id;
    }

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

    public String getQrCode() {
        return qrCode;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getAreaM2() {
        return areaM2;
    }

    public void setAreaM2(Double areaM2) {
        this.areaM2 = areaM2;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Instant getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Instant createdDate) {
        this.createdDate = createdDate;
    }

    public Instant getModifiedDate() {
        return modifiedDate;
    }

    public void setModifiedDate(Instant modifiedDate) {
        this.modifiedDate = modifiedDate;
    }

    public Instant getDeletedDate() {
        return deletedDate;
    }

    public void setDeletedDate(Instant deletedDate) {
        this.deletedDate = deletedDate;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getTbAddressId() {
        return tbAddressId;
    }

    public void setTbAddressId(Long tBAddressId) {
        this.tbAddressId = tBAddressId;
    }

    public Long getCreatedById() {
        return createdById;
    }

    public void setCreatedById(Long tBDetailUserId) {
        this.createdById = tBDetailUserId;
    }

    public Long getModifiedById() {
        return modifiedById;
    }

    public void setModifiedById(Long tBDetailUserId) {
        this.modifiedById = tBDetailUserId;
    }

    public Long getDeletedById() {
        return deletedById;
    }

    public void setDeletedById(Long tBDetailUserId) {
        this.deletedById = tBDetailUserId;
    }

    public Long getTbCustomerId() {
        return tbCustomerId;
    }

    public void setTbCustomerId(Long tBCustomerId) {
        this.tbCustomerId = tBCustomerId;
    }

    public Long getTbEntityTypeId() {
        return tbEntityTypeId;
    }

    public void setTbEntityTypeId(Long tbEntityTypeId) {
        this.tbEntityTypeId = tbEntityTypeId;
    }

    public List<TBDetailUserDTO> getDetailUserDTOS() {
        return detailUserDTOS;
    }

    public void setDetailUserDTOS(List<TBDetailUserDTO> detailUserDTOS) {
        this.detailUserDTOS = detailUserDTOS;
    }

    public List<TBCropDTO> getTbCropDTOS() {
        return tbCropDTOS;
    }

    public void setTbCropDTOS(List<TBCropDTO> tbCropDTOS) {
        this.tbCropDTOS = tbCropDTOS;
    }

    public Integer getColor() {
        return color;
    }

    public void setColor(Integer color) {
        this.color = color;
    }

    public Long getTotalDevice() {
        return totalDevice;
    }

    public void setTotalDevice(Long totalDevice) {
        this.totalDevice = totalDevice;
    }

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

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

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

    @Override
    public String toString() {
        return "TBEntityDTO{" +
            "id=" + getId() +
            ", qrCode='" + getQrCode() + "'" +
            ", name='" + getName() + "'" +
            ", areaM2=" + getAreaM2() +
            ", level=" + getLevel() +
            ", status='" + getStatus() + "'" +
            ", createdDate='" + getCreatedDate() + "'" +
            ", modifiedDate='" + getModifiedDate() + "'" +
            ", deletedDate='" + getDeletedDate() + "'" +
            ", tbEntity=" + getParentId() +
            ", tbAddress=" + getTbAddressId() +
            ", createdBy=" + getCreatedById() +
            ", modifiedBy=" + getModifiedById() +
            ", deletedBy=" + getDeletedById() +
            ", tbCustomer=" + getTbCustomerId() +
            ", color=" + getColor() +
            "}";
    }
}
