package com.dashitech.businessdata.entity;

import com.dashitech.utils.I18n;

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

/**
 * Created by chi on 2019/10/9.
 *
 *  hospital、dept 字段为编码、转换到主表要变成id
 */
@Entity
@Table(name = "itsm_uc_user")
public class UserEntity  implements Serializable {

    private static final long serialVersionUID = 1L;

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


    /**
     * 账号、工号
     */
    @I18n("账号")
    @Column(name = "ACCOUNT", nullable = false)
    private String account;

    @I18n("密码")
    @Column(name = "PWD", nullable = false)
    private String pwd;
    /**
     * 姓名
     */
    @I18n("名称")
    @Column(name = "NAME", nullable = false)
    private String name;

    @I18n("院区编码，主表为id这里为编码")
    @Column(name = "hospital_id")
    private String hospital;
    /**
     * 性别key male
     */
    @I18n("性别")
    @Column(name="GENDER")
    private Long genderId;
    /**
     * 电话号码
     */
//    @I18n("电话号码")
//    @Column(name = "PHONE")
//    private String phone;
//
//    @I18n("座机号码")
//    @Column(name = "DIALING")
//    private String dialing;

    @I18n("所属科室为科室id")
    @Column(name="DEPTID")
    private String dept;

//    @I18n("微信号")
//    @Column(name = "WEIXIN")
//    private String weixin;


    @I18n("删除标识")
    @Column(name = "delete_flag")
    private Integer deleteFlag;

    @I18n("用户类型，护士1、工友2、医生3")
    @Column(name="usertype")
    private String usertype;

//    @I18n("HIS系统员工ID")
//    @Column(name = "hisid")
//    private String hisid;
//
//    @I18n("跟登录账号一样没啥用，单点登录标识")
//    @Column(name = "emp_no")
//    private String empno;

    @I18n("拼音全拼")
    @Column(name="pinyin")
    private  String pingYin;

    @I18n("拼音首字符")
    @Column(name = "input_code")
    private String inputCode;

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getPingYin() {
        return pingYin;
    }

    public void setPingYin(String pingYin) {
        this.pingYin = pingYin;
    }

    public String getInputCode() {
        return inputCode;
    }

    public void setInputCode(String inputCode) {
        this.inputCode = inputCode;
    }

    public Long getId() {
        return id;
    }

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

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getGenderId() {
        return genderId;
    }

    public void setGenderId(Long genderId) {
        this.genderId = genderId;
    }


//    public String getPhone() {
//        return phone;
//    }
//
//    public void setPhone(String phone) {
//        this.phone = phone;
//    }
//
//    public String getDialing() {
//        return dialing;
//    }
//
//    public void setDialing(String dialing) {
//        this.dialing = dialing;
//    }

//    public String getWeixin() {
//        return weixin;
//    }
//
//    public void setWeixin(String weixin) {
//        this.weixin = weixin;
//    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getUsertype() {
        return usertype;
    }

    public void setUsertype(String usertype) {
        this.usertype = usertype;
    }

//    public String getHisid() {
//        return hisid;
//    }
//
//    public void setHisid(String hisid) {
//        this.hisid = hisid;
//    }
//
//    public String getEmpno() {
//        return empno;
//    }
//
//    public void setEmpno(String empno) {
//        this.empno = empno;
//    }

    public String getHospital() {
        return hospital;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    public String getDept() {
        return dept;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }

    @Override
    public String toString() {
        return "UserEntity{" +
                "id=" + id +
                ", account='" + account + '\'' +
                ", name='" + name + '\'' +
                ", gender='" + genderId + '\'' +
//                ", phone='" + phone + '\'' +
//                ", dialing='" + dialing + '\'' +
                ", dept=" + dept +
//                ", weixin='" + weixin + '\'' +
                ", deleteFlag=" + deleteFlag +
                ", usertype='" + usertype + '\'' +
//                ", hisid='" + hisid + '\'' +
//                ", empno='" + empno + '\'' +
                '}';
    }
}
