package com.its.op;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

public class TbRoadVrtxArrEntityPK implements Serializable {
    @Column(name = "ROAD_ID", nullable = false, precision = 0)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long roadId;
    @Column(name = "LEVL", nullable = false, precision = 0)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int levl;

    public Long getRoadId() {
        return roadId;
    }

    public void setRoadId(Long roadId) {
        this.roadId = roadId;
    }

    public int getLevl() {
        return levl;
    }

    public void setLevl(int levl) {
        this.levl = levl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbRoadVrtxArrEntityPK that = (TbRoadVrtxArrEntityPK) o;
        return levl == that.levl && Objects.equals(roadId, that.roadId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roadId, levl);
    }
}
