package cn.edu.whu.boot.allocation.entities;

public class TaskCell {
    private Integer id;

    private Integer taskId;

    private String geohash;

    private String geojson;

    public TaskCell() {
    }

    public TaskCell(Integer taskId, String geohash, String geojson) {
        this.taskId = taskId;
        this.geohash = geohash;
        this.geojson = geojson;
    }

    public Integer getId() {
        return id;
    }

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

    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public String getGeohash() {
        return geohash;
    }

    public void setGeohash(String geohash) {
        this.geohash = geohash;
    }

    public String getGeojson() {
        return geojson;
    }

    public void setGeojson(String geojson) {
        this.geojson = geojson;
    }

    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + taskId.hashCode();
        result = 31 * result + geohash.hashCode();
        result = 31 * result + geojson.hashCode();
        return result;

    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof TaskCell)) {
            return false;
        }
        TaskCell it = (TaskCell) obj;
        return this.taskId.equals(it.taskId)
                && this.geohash.equals(it.geohash)
                && this.geojson.equals(it.geojson);
    }
}
