package com.dashitech.businessdata.entity;

import com.dashitech.utils.I18n;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by chi on 2019/9/12.
 * 静配大包表
 * target、launch 这里为编码 主表为id
 */
@Entity
@Table(name = "itsm_jp_bag")
public class JPBagEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="id",length = 20)
    private Long id;

    @I18n("大包id")
    @Column(name = "packid")
    private String packid;

    @I18n("目标科室编码，这里为编码 主表为id（发起申请的临床科室编码）")
    @Column(name = "target")
    private String target;

    @I18n("来源科室编码，这里为编码 主表为id（发药科室编码）")
    @Column(name = "launch")
    private String launch;

    @I18n("大包创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "creat_time")
    private Date creatTime;

    @I18n("药品状态")
    @Column(name = "jp_state")
    private Integer jpState;

    @I18n("院区编码")
    @Column(name = "hos_id")
    private String hosID;


    public Long getId() {
        return id;
    }

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

    public String getPackid() {
        return packid;
    }

    public void setPackid(String packid) {
        this.packid = packid;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public String getLaunch() {
        return launch;
    }

    public void setLaunch(String launch) {
        this.launch = launch;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    public Integer getJpState() {
        return jpState;
    }

    public void setJpState(Integer jpState) {
        this.jpState = jpState;
    }

    public String getHosID() {
        return hosID;
    }

    public void setHosID(String hosID) {
        this.hosID = hosID;
    }

    @Override
    public String toString() {
        return "JPBagEntity{" +
                "id=" + id +
                ", packid='" + packid + '\'' +
                ", target='" + target + '\'' +
                ", launch='" + launch + '\'' +
                ", creatTime=" + creatTime +
                ", jpState=" + jpState +
                ", hosID='" + hosID + '\'' +
                '}';
    }
}
