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.
 * 药品大包表
 *
 * launch、target 这里为编码 主表为id
 */
@Entity
@Table(name = "itsm_transport_drugs_bag")
public class DrugsBagEntity 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="launch")
    private String launch;

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

    @I18n("药品包号")
    @Column(name = "packid")
    private String packid;

    @I18n("药品状态")
    @Column(name = "drugs_state")
    private Long drugsState;

    @I18n("打包时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "pack_time")
    private Date packTime;

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

    @I18n("批次号")
    @Column(name = "batch_No")
    private String batchNo;

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

    public String getHosId() {
        return hosId;
    }

    public void setHosId(String hosId) {
        this.hosId = hosId;
    }

    public String getLaunch() {
        return launch;
    }

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

    public String getTarget() {
        return target;
    }

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

    public String getPackid() {
        return packid;
    }

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

    public Long getDrugsState() {
        return drugsState;
    }

    public void setDrugsState(Long drugsState) {
        this.drugsState = drugsState;
    }

    public Date getPackTime() {
        return packTime;
    }

    public void setPackTime(Date packTime) {
        this.packTime = packTime;
    }

    public Long getId() {
        return id;
    }

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

    public Date getCreatTime() {
        return creatTime;
    }

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

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    @Override
    public String toString() {
        return "DrugsBagEntity{" +
                "id=" + id +
                ", launch='" + launch + '\'' +
                ", target='" + target + '\'' +
                ", packid='" + packid + '\'' +
                ", drugsState=" + drugsState +
                ", packTime=" + packTime +
                ", creatTime=" + creatTime +
                ", batchNo='" + batchNo + '\'' +
                '}';
    }
}
