package com.ywt.outpatient.domain.entity.center;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name = "medical_card")
public class MedicalCard {
    /**
     * 主键
     */
    @Id
    private Integer id;

    /**
     * 用户Id
     */
    @Column(name = "user_id", nullable = false)
    private Integer userId;

    /**
     * 医院Id
     */
    @Column(name = "hospital_id", nullable = false)
    private Integer hospitalId;

    /**
     * 卡号
     */
    @Column(name = "card_no", nullable = false)
    private String cardNo;

    /**
     * 卡类型
     */
    @Column(name = "card_type")
    private String cardType;

    /**
     * 姓名
     */
    @Column(name = "patient_name", nullable = false)
    private String patientName;

    /**
     * 预约手机号
     */
    @Column(name = "mobile", nullable = false)
    private String mobile;

    /**
     * HIS系统病人Id
     */
    @Column(name = "his_patient_id", nullable = false)
    private String hisPatientId;

    /**
     * 病人类型
     */
    @Column(name = "patient_type")
    private String patientType;

    /**
     * 性别（0-未知 1-男 2-女）
     */
    @Column(name = "sex", nullable = false)
    private Integer sex;

    /**
     * 出生日期
     */
    @Column(name = "birthday")
    private String birthday;

    /**
     * 家庭住址
     */
    private String address;

    /**
     * 联系电话（1､南方医院，由HIS接口返回，2､太和分院，绑定时用户输入）
     */
    @Column(name = "telephone_no")
    private String telephoneNo;

    /**
     * 病案号
     */
    @Column(name = "document_id")
    private String documentId;

    /**
     * 账户余额（以分为单位）
     */
    @Column(name = "balance", nullable = false)
    private Integer balance;

    /**
     * 证件类型（代码）
     */
    @Column(name = "id_type_code")
    private String idTypeCode;

    /**
     * 证件类型（描述）
     */
    @Column(name = "id_type_desc")
    private String idTypeDesc;

    /**
     * 证件号
     */
    @Column(name = "id_no")
    private String idNo;

    /**
     * 医保卡号
     */
    @Column(name = "insure_card_no")
    private String insureCardNo;

    /**
     * 账户信息
     */
    @Column(name = "acc_info")
    private String accInfo;

    /**
     * 状态（1-正常，2-删除）
     */
    @Column(name = "status", nullable = false)
    private Integer status;

    /**
     * 上次使用时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = false)
    private Date createTime;

    /**
     * 监护人（家长姓名）
     */
    @Column(name = "guardian")
    private String guardian;

    /**
     * 最后（上一次）的选择，0-否，1-是
     */
    @Column(name = "last_choice")
    private Integer lastChoice;

    @Column(name = "his_sync_time")
    private Date hisSyncTime;
    @Column(name = "last_chosen_time")
    private Date lastChosenTime;

    /**
     * 与本人关系，枚举参考：{@link com.ywt.rpc.domain.models.enums.RelationshipEnum}
     */
    @Column(name = "relationship")
    private Integer relationship;

    /**
     * 是否是默认诊疗卡，0-不是，1-是
     */
    @Column(name = "default_card")
    private Integer defaultCard;

    public Integer getId() {
        return id;
    }

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

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getHospitalId() {
        return hospitalId;
    }

    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getHisPatientId() {
        return hisPatientId;
    }

    public void setHisPatientId(String hisPatientId) {
        this.hisPatientId = hisPatientId;
    }

    public String getPatientType() {
        return patientType;
    }

    public void setPatientType(String patientType) {
        this.patientType = patientType;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getTelephoneNo() {
        return telephoneNo;
    }

    public void setTelephoneNo(String telephoneNo) {
        this.telephoneNo = telephoneNo;
    }

    public String getDocumentId() {
        return documentId;
    }

    public void setDocumentId(String documentId) {
        this.documentId = documentId;
    }

    public Integer getBalance() {
        return balance;
    }

    public void setBalance(Integer balance) {
        this.balance = balance;
    }

    public String getIdTypeCode() {
        return idTypeCode;
    }

    public void setIdTypeCode(String idTypeCode) {
        this.idTypeCode = idTypeCode;
    }

    public String getIdTypeDesc() {
        return idTypeDesc;
    }

    public void setIdTypeDesc(String idTypeDesc) {
        this.idTypeDesc = idTypeDesc;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public String getInsureCardNo() {
        return insureCardNo;
    }

    public void setInsureCardNo(String insureCardNo) {
        this.insureCardNo = insureCardNo;
    }

    public String getAccInfo() {
        return accInfo;
    }

    public void setAccInfo(String accInfo) {
        this.accInfo = accInfo;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getGuardian() {
        return guardian;
    }

    public void setGuardian(String guardian) {
        this.guardian = guardian;
    }

    public Integer getLastChoice() {
        return lastChoice;
    }

    public void setLastChoice(Integer lastChoice) {
        this.lastChoice = lastChoice;
    }

    public Date getHisSyncTime() {
        return hisSyncTime;
    }

    public void setHisSyncTime(Date hisSyncTime) {
        this.hisSyncTime = hisSyncTime;
    }

    public Date getLastChosenTime() {
        return lastChosenTime;
    }

    public void setLastChosenTime(Date lastChosenTime) {
        this.lastChosenTime = lastChosenTime;
    }

    public Integer getRelationship() {
        return relationship;
    }

    public void setRelationship(Integer relationship) {
        this.relationship = relationship;
    }

    public Integer getDefaultCard() {
        return defaultCard;
    }

    public void setDefaultCard(Integer defaultCard) {
        this.defaultCard = defaultCard;
    }
}
