package com.its.op;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

@Entity
@Table(name = "TB_IFSC_VRTX_ARR", schema = "YIITS", catalog = "")
@IdClass(TbIfscVrtxArrEntityPK.class)
public class TbIfscVrtxArrEntity {
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    @Column(name = "IFSC_ID", nullable = false, precision = 0)
    private int ifscId;
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    @Column(name = "LEVL", nullable = false, precision = 0)
    private int levl;
    @Basic
    @Column(name = "CRDN_CNT", nullable = true, precision = 0)
    private Integer crdnCnt;
    @Basic
    @Column(name = "X_CRDN_ARR", nullable = true, length = 4000)
    private String xCrdnArr;
    @Basic
    @Column(name = "Y_CRDN_ARR", nullable = true, length = 4000)
    private String yCrdnArr;
    @Basic
    @Column(name = "X_CRDN_MIN", nullable = true, precision = 8)
    private BigDecimal xCrdnMin;
    @Basic
    @Column(name = "X_CRDN_MAX", nullable = true, precision = 8)
    private BigDecimal xCrdnMax;
    @Basic
    @Column(name = "Y_CRDN_MIN", nullable = true, precision = 8)
    private BigDecimal yCrdnMin;
    @Basic
    @Column(name = "Y_CRDN_MAX", nullable = true, precision = 8)
    private BigDecimal yCrdnMax;

    public int getIfscId() {
        return ifscId;
    }

    public void setIfscId(int ifscId) {
        this.ifscId = ifscId;
    }

    public int getLevl() {
        return levl;
    }

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

    public Integer getCrdnCnt() {
        return crdnCnt;
    }

    public void setCrdnCnt(Integer crdnCnt) {
        this.crdnCnt = crdnCnt;
    }

    public String getxCrdnArr() {
        return xCrdnArr;
    }

    public void setxCrdnArr(String xCrdnArr) {
        this.xCrdnArr = xCrdnArr;
    }

    public String getyCrdnArr() {
        return yCrdnArr;
    }

    public void setyCrdnArr(String yCrdnArr) {
        this.yCrdnArr = yCrdnArr;
    }

    public BigDecimal getxCrdnMin() {
        return xCrdnMin;
    }

    public void setxCrdnMin(BigDecimal xCrdnMin) {
        this.xCrdnMin = xCrdnMin;
    }

    public BigDecimal getxCrdnMax() {
        return xCrdnMax;
    }

    public void setxCrdnMax(BigDecimal xCrdnMax) {
        this.xCrdnMax = xCrdnMax;
    }

    public BigDecimal getyCrdnMin() {
        return yCrdnMin;
    }

    public void setyCrdnMin(BigDecimal yCrdnMin) {
        this.yCrdnMin = yCrdnMin;
    }

    public BigDecimal getyCrdnMax() {
        return yCrdnMax;
    }

    public void setyCrdnMax(BigDecimal yCrdnMax) {
        this.yCrdnMax = yCrdnMax;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbIfscVrtxArrEntity that = (TbIfscVrtxArrEntity) o;
        return ifscId == that.ifscId && levl == that.levl && Objects.equals(crdnCnt, that.crdnCnt) && Objects.equals(xCrdnArr, that.xCrdnArr) && Objects.equals(yCrdnArr, that.yCrdnArr) && Objects.equals(xCrdnMin, that.xCrdnMin) && Objects.equals(xCrdnMax, that.xCrdnMax) && Objects.equals(yCrdnMin, that.yCrdnMin) && Objects.equals(yCrdnMax, that.yCrdnMax);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ifscId, levl, crdnCnt, xCrdnArr, yCrdnArr, xCrdnMin, xCrdnMax, yCrdnMin, yCrdnMax);
    }
}
