package com.eitc.patient.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eitc.common.core.domain.EitcBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * Patient
 *
 * @author mtx
 * @date: 2024/05/17 14:44
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("患者表")
@TableName("erm_patient")
public class Patient extends EitcBaseEntity {

    @TableField(value = "medical_record_num")
    @ApiModelProperty(value = "用户编号", name = "medicalRecordNum")
    private String medicalRecordNum;

    @TableField(value = "patient_name")
    @ApiModelProperty(value = "患者姓名", name = "patientName")
    @NotBlank(message = "患者姓名不能为空")
    private String patientName;

    @TableField(value = "patient_phone")
    @ApiModelProperty(value = "患者手机号", name = "patientPhone")
    private String patientPhone;

    @TableField(value = "personal_relationship")
    @ApiModelProperty(value = "与患者关系", name = "personalRelationship")
    private String personalRelationship;

    @TableField(value = "link_phone")
    @ApiModelProperty(value = "联系人电话", name = "linkPhone")
    private String linkPhone;

    @TableField(value = "home_address")
    @ApiModelProperty(value = "家庭住址", name = "homeAddress")
    private String homeAddress;

    @TableField(value = "birthday")
    @ApiModelProperty(value = "出生日期", name = "birthday")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @TableField(value = "sex")
    @ApiModelProperty(value = "性别（1男，2女）", name = "sex")
    private Integer sex;

    @TableField(value = "citizenship")
    @ApiModelProperty(value = "国籍", name = "citizenship")
    private String citizenship;

    @TableField(value = "avatar")
    @ApiModelProperty(value = "头像", name = "avatar")
    private String avatar;

    @TableField(value = "identification_card")
    @ApiModelProperty(value = "身份证号", name = "identificationCard")
    private String identificationCard;

    @TableField(value = "document_type")
    @ApiModelProperty(value = "证件类型", name = "documentType")
    private Integer documentType;

    @TableField(value = "work_unit")
    @ApiModelProperty(value = "工作单位", name = "workUnit")
    private String workUnit;

    @TableField(value = "occupation")
    @ApiModelProperty(value = "职业", name = "occupation")
    private String occupation;

    @TableField(value = "nationality")
    @ApiModelProperty(value = "民族", name = "nationality")
    private String nationality;

    @TableField(value = "blood_group")
    @ApiModelProperty(value = "血型", name = "bloodGroup")
    private String bloodGroup;

    @TableField(value = "marriage")
    @ApiModelProperty(value = "婚姻（1未婚，2已婚，3丧偶，4离婚）", name = "marriage")
    private Integer marriage;

    @TableField(value = "patient_source")
    @ApiModelProperty(value = "患者来源（1朋友介绍，2自进门店）", name = "patientSource")
    private Integer patientSource;

    @TableField(value = "remark")
    @ApiModelProperty(value = "备注", name = "remark")
    private String remark;

    @TableField(value = "patient_tags")
    @ApiModelProperty(value = "患者标签", name = "patientTags")
    private String patientTags;

    @TableField(value = "create_type")
    @ApiModelProperty(value = "创建类型（1pc，2app）", name = "createType")
    private Integer createType;

}
