package vn.azteam.tpf.service.dto;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;

public class CropPersonInChargeDTO implements Serializable {

    private Long cropId;

    private Set<Long> detailUserIds = new HashSet<>();

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

        CropPersonInChargeDTO cropPersonInChargeDTO = (CropPersonInChargeDTO) o;
        if (cropPersonInChargeDTO.getCropId() == null || getCropId() == null) {
            return false;
        }
        return Objects.equals(getCropId(), cropPersonInChargeDTO.getCropId());
    }

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

    public Set<Long> getDetailUserIds() {
        return detailUserIds;
    }

    public void setDetailUserIds(Set<Long> detailUserIds) {
        this.detailUserIds = detailUserIds;
    }

    public Long getCropId() {
        return cropId;
    }

    public void setCropId(Long cropId) {
        this.cropId = cropId;
    }
}
