package com.qmth.qrzk.repository.user.model;

import com.qmth.qrzk.supplypaper.model.Province;

import javax.persistence.*;

@Entity
@Table(name = "c_confidential_handover")
public class Confidential {

    @Id
    @GeneratedValue
    private int id;


    @ManyToOne(targetEntity = Province.class, fetch = FetchType.EAGER)
    @JoinColumn(name = "province_code", referencedColumnName = "code")
    private Province province;

    @Column(name = "year_month")
    private String yearMonth;
    @Column(name = "bag_num")
    private Integer bagNum;


    @ManyToOne(targetEntity = PaperBatch.class, fetch = FetchType.EAGER)
    @JoinColumn(name = "batch_id", referencedColumnName = "id")
    private PaperBatch paperBatch;

    public int getId() {
        return id;
    }

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

    public Province getProvince() {
        return province;
    }

    public void setProvince(Province province) {
        this.province = province;
    }

    public String getYearMonth() {
        return yearMonth;
    }

    public void setYearMonth(String yearMonth) {
        this.yearMonth = yearMonth;
    }

    public Integer getBagNum() {
        return bagNum;
    }

    public void setBagNum(Integer bagNum) {
        this.bagNum = bagNum;
    }


    public Confidential() {
    }


    public PaperBatch getPaperBatch() {
        return paperBatch;
    }

    public void setPaperBatch(PaperBatch paperBatch) {
        this.paperBatch = paperBatch;
    }
}
