package com.yihu.jw.entity.base.patient;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

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


/**
 * 居民信息（居民就是患者）实体
 *
 * @author Administrator on  2018年09月05日
 */
@Entity
@Table(name = "base_patient")
public class BasePatientDO extends UuidIdentityEntityWithOperator {

    /**
     * saas配置id
     */
//    @NotNull(message = "saasid不可为空")
    private String saasId;

    /**
     * 身份证号
     */
//    @NotNull(message = "身份证号不可为空")
    private String idcard;

    /**
     * 登录密码
     */
    private String password;

    /**
     *
     */
    private String salt;

    /**
     * 姓名
     */
    private String name;

    /**
     * 生日
     */
//	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date birthday;

    /**
     * 性别，1男，2女
     */
//    @Range(min = 1, max = 2, message = "1-男，2-女")
    private Integer sex;

    /**
     * 手机号
     */
//    @Length(min = 11,max = 11,message = "手机号长度为11位")
    private String mobile;


    /**
     * 头像http地址
     */
    private String photo;

    /**
     * 省代码
     */
    private String provinceCode;

    /**
     * 省名称
     */
    private String provinceName;

    /**
     * 市代码
     */
    private String cityCode;

    /**
     * 市名称
     */
    private String cityName;

    /**
     * 区县代码
     */
    private String townCode;

    /**
     * 区县名称
     */
    private String townName;

    /**
     * 街道代码
     */
    private String streetCode;

    /**
     * 街道名称
     */
    private String streetName;

    /**
     * 地址
     */
    private String address;

    /**
     * 居住省代码
     */
    private String liveProvinceCode;


    /**
     * 居住省名称
     */
    private String liveProvinceName;

    /**
     * 居住市代码
     */
    private String liveCityCode;

    /**
     * 居住市名称
     */
    private String liveCityName;

    /**
     * 居住区县代码
     */
    private String liveTownCode;

    /**
     * 居住区县名称
     */
    private String liveTownName;

    /**
     * 居住街道代码
     */
    private String liveStreetCode;
    /**
     * 居住街道名称
     */
    private String liveStreetName;


    /**
     * 居住居委会代码
     */
    private String committeeCode;

    /**
     * 居住居委会名称
     */
    private String committeeName;

    /**
     * 总积分
     */
    private String points;

    /**
     * 病历总数
     */
    private String recordAmount;

    /**
     * 用户状态：1正常，0禁用，-1恶意注册，2审核中
     */
    private String patientStatus;

    /**
     * 联系方式备注【基卫】
     */
    private String mobileRemarks;

    /**
     * 绑定电子社保卡主体（共济为操作人code，医社保关联patient_medicare_card）
     */
    private String principalCode;

    /**
     * 居民预警状态：0为标准，1为预警状态
     */
    private Integer standardStatus;

    /**
     * unionId 开发平台唯一标识
     */
    private String unionid;

    /**
     * 作废标识，1正常，0作废
     */
    private String del;

    /**
     * 备注
     */
    private String remark;

    /**
     * 账号是否被锁定
     */
    private Integer locked;

    /**
     * 是否可以登录
     */
    private Integer enabled;

    /**
     * 登录失败次数
     */
    private Integer loginFailureCount;

    /**
     * 锁定日期
     */
    private Date lockedDate;

    /**
     * 登录日期
     */
    private Date loginDate;

    private String userId;

    /**
     * 互联网医院 眼科通id
     * 医养项目 照护类型 2置顶 1重点照护
     */
    private String yktId;

    private String register;

    private String phone;
    private String openid;
    private Date openidTime;
    private String cardType;
    private String alipayId;//支付宝id

    /**
     * 婚姻状况【10.未婚 20.已婚 30.丧偶 40.离婚 90.未说明的婚姻状况】
     */
    private Integer marriage;
    /**
     * '民族'
     */
    private Integer national;
    /**
     * 血型【1.A型 2.B型 3.O型 4.AB型 5.不详】
     */
    private Integer blood;
    /**
     * '民族名称'
     */
    private String nationalName;

    /**
     * 医保卡号
     */
    private String ssc;
    private String medicareNumber;//医疗保险号

    private Integer archiveStatus;//档案状态【1.未管理 2.死亡 3.正常 4.高危】【必填】
    private Integer archiveType;// 档案类型 1老人 2新生儿 3老人家属

    private String archiveStatusName;
    private String archiveTypeName;
    private String bloodName;
    private String marriageName;

    private String latLon;//定位经纬度
    private String padImei;//绑定平板标志
    private String residentialArea;//居住小区
    private Integer signStatus;// 签约状态【0未签约，1已签约】

    private Integer deviceFlag;//绑定设备标识 大于0为绑定了设备

    private String medicalState;//医保授权状态


    @Column(name = "medical_state")
    public String getMedicalState() {
        return medicalState;
    }

    public void setMedicalState(String medicalState) {
        this.medicalState = medicalState;
    }

    public String getCardType() {
        return cardType;
    }

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

    public Date getOpenidTime() {
        return openidTime;
    }

    public void setOpenidTime(Date openidTime) {
        this.openidTime = openidTime;
    }

    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    /**
     * 上线下线状态
     */
    private String online;//1上线0下线

    @Column(name = "register")
    public String getRegister() {
        return register;
    }

    public void setRegister(String register) {
        this.register = register;
    }

    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }

    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }

    @Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "salt")
    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

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

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    @Column(name = "birthday")
    public Date getBirthday() {
        return birthday;
    }

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

    @Column(name = "sex")
    public Integer getSex() {
        return sex;
    }

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

    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

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

    @Column(name = "photo")
    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Column(name = "province_code")
    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    @Column(name = "province_name")
    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    @Column(name = "city_code")
    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    @Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Column(name = "town_code")
    public String getTownCode() {
        return townCode;
    }

    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }

    @Column(name = "town_name")
    public String getTownName() {
        return townName;
    }

    public void setTownName(String townName) {
        this.townName = townName;
    }

    @Column(name = "street_code")
    public String getStreetCode() {
        return streetCode;
    }

    public void setStreetCode(String streetCode) {
        this.streetCode = streetCode;
    }

    @Column(name = "street_name")
    public String getStreetName() {
        return streetName;
    }

    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }

    @Column(name = "committee_code")
    public String getCommitteeCode() {
        return committeeCode;
    }

    public void setCommitteeCode(String committeeCode) {
        this.committeeCode = committeeCode;
    }

    @Column(name = "committee_name")
    public String getCommitteeName() {
        return committeeName;
    }

    public void setCommitteeName(String committeeName) {
        this.committeeName = committeeName;
    }

    @Column(name = "address")
    public String getAddress() {
        return address;
    }

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

    @Column(name = "points")
    public String getPoints() {
        return points;
    }

    public void setPoints(String points) {
        this.points = points;
    }

    @Column(name = "record_amount")
    public String getRecordAmount() {
        return recordAmount;
    }

    public void setRecordAmount(String recordAmount) {
        this.recordAmount = recordAmount;
    }

    @Column(name = "patient_status")
    public String getPatientStatus() {
        return patientStatus;
    }

    public void setPatientStatus(String patientStatus) {
        this.patientStatus = patientStatus;
    }

    @Column(name = "mobile_remarks")
    public String getMobileRemarks() {
        return mobileRemarks;
    }

    public void setMobileRemarks(String mobileRemarks) {
        this.mobileRemarks = mobileRemarks;
    }

    @Column(name = "principal_code")
    public String getPrincipalCode() {
        return principalCode;
    }

    public void setPrincipalCode(String principalCode) {
        this.principalCode = principalCode;
    }

    @Column(name = "standard_status")
    public Integer getStandardStatus() {
        return standardStatus;
    }

    public void setStandardStatus(Integer standardStatus) {
        this.standardStatus = standardStatus;
    }

    @Column(name = "unionid")
    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    @Column(name = "del")
    public String getDel() {
        return del;
    }

    public void setDel(String del) {
        this.del = del;
    }

    public String getRemark() {
        return remark;
    }

    @Column(name = "remark")
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getLiveProvinceCode() {
        return liveProvinceCode;
    }

    public void setLiveProvinceCode(String liveProvinceCode) {
        this.liveProvinceCode = liveProvinceCode;
    }

    public String getLiveProvinceName() {
        return liveProvinceName;
    }

    public void setLiveProvinceName(String liveProvinceName) {
        this.liveProvinceName = liveProvinceName;
    }

    public String getLiveCityCode() {
        return liveCityCode;
    }

    public void setLiveCityCode(String liveCityCode) {
        this.liveCityCode = liveCityCode;
    }

    public String getLiveCityName() {
        return liveCityName;
    }

    public void setLiveCityName(String liveCityName) {
        this.liveCityName = liveCityName;
    }

    public String getLiveTownCode() {
        return liveTownCode;
    }

    public void setLiveTownCode(String liveTownCode) {
        this.liveTownCode = liveTownCode;
    }

    public String getLiveTownName() {
        return liveTownName;
    }

    public void setLiveTownName(String liveTownName) {
        this.liveTownName = liveTownName;
    }

    @Column(name = "live_street_code")
    public String getLiveStreetCode() {
        return liveStreetCode;
    }

    public void setLiveStreetCode(String liveStreetCode) {
        this.liveStreetCode = liveStreetCode;
    }

    @Column(name = "live_street_name")
    public String getLiveStreetName() {
        return liveStreetName;
    }

    public void setLiveStreetName(String liveStreetName) {
        this.liveStreetName = liveStreetName;
    }

    public Integer getLocked() {
        return locked;
    }

    public void setLocked(Integer locked) {
        this.locked = locked;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public Integer getLoginFailureCount() {
        return loginFailureCount;
    }

    public void setLoginFailureCount(Integer loginFailureCount) {
        this.loginFailureCount = loginFailureCount;
    }

    public Date getLockedDate() {
        return lockedDate;
    }

    public void setLockedDate(Date lockedDate) {
        this.lockedDate = lockedDate;
    }

    public Date getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    @Column(name = "user_id")
    public String getUserId() {
        return userId;
    }

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

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Column(name = "ykt_id")
    public String getYktId() {
        return yktId;
    }

    public void setYktId(String yktId) {
        this.yktId = yktId;
    }


    @Column(name = "on_line")
    public String getOnline() {
        return online;
    }

    public void setOnline(String online) {
        this.online = online;
    }

    @Column(name = "alipay_id")
    public String getAlipayId() {
        return alipayId;
    }

    public void setAlipayId(String alipayId) {
        this.alipayId = alipayId;
    }

    @Column(name = "marriage")
    public Integer getMarriage() {
        return marriage;
    }

    public void setMarriage(Integer marriage) {
        this.marriage = marriage;
    }

    @Column(name = "national")
    public Integer getNational() {
        return national;
    }

    public void setNational(Integer national) {
        this.national = national;
    }

    @Column(name = "blood")
    public Integer getBlood() {
        return blood;
    }

    public void setBlood(Integer blood) {
        this.blood = blood;
    }

    @Column(name = "national_name")
    public String getNationalName() {
        return nationalName;
    }

    public void setNationalName(String nationalName) {
        this.nationalName = nationalName;
    }

    @Column(name = "ssc")
    public String getSsc() {
        return ssc;
    }

    public void setSsc(String ssc) {
        this.ssc = ssc;
    }

    @Column(name = "archive_status")
    public Integer getArchiveStatus() {
        return archiveStatus;
    }

    public void setArchiveStatus(Integer archiveStatus) {
        this.archiveStatus = archiveStatus;
    }

    @Column(name = "archive_type")
    public Integer getArchiveType() {
        return archiveType;
    }

    public void setArchiveType(Integer archiveType) {
        this.archiveType = archiveType;
    }

    @Column(name = "medicare_number")
    public String getMedicareNumber() {
        return medicareNumber;
    }

    public void setMedicareNumber(String medicareNumber) {
        this.medicareNumber = medicareNumber;
    }

    @Transient
    public String getArchiveStatusName() {
        return archiveStatusName;
    }

    public void setArchiveStatusName(String archiveStatusName) {
        this.archiveStatusName = archiveStatusName;
    }

    @Transient
    public String getArchiveTypeName() {
        return archiveTypeName;
    }

    public void setArchiveTypeName(String archiveTypeName) {
        this.archiveTypeName = archiveTypeName;
    }

    @Transient
    public String getBloodName() {
        return bloodName;
    }

    public void setBloodName(String bloodName) {
        this.bloodName = bloodName;
    }

    @Transient
    public String getMarriageName() {
        return marriageName;
    }

    public void setMarriageName(String marriageName) {
        this.marriageName = marriageName;
    }

    @Column(name = "lat_lon")
    public String getLatLon() {
        return latLon;
    }

    public void setLatLon(String latLon) {
        this.latLon = latLon;
    }

    @Column(name = "pad_imei")
    public String getPadImei() {
        return padImei;
    }

    public void setPadImei(String padImei) {
        this.padImei = padImei;
    }

    @Column(name = "residential_area")
    public String getResidentialArea() {
        return residentialArea;
    }

    public void setResidentialArea(String residentialArea) {
        this.residentialArea = residentialArea;
    }

    @Column(name = "sign_status")
    public Integer getSignStatus() {
        return signStatus;
    }

    public void setSignStatus(Integer signStatus) {
        this.signStatus = signStatus;
    }

    @Transient
    public Integer getDeviceFlag() {
        return deviceFlag;
    }

    public void setDeviceFlag(Integer deviceFlag) {
        this.deviceFlag = deviceFlag;
    }
}