package thyyxxk.webserver.entity.outpatient.mangedoctorinfo;

import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class DoctorInfo {
    @NotBlank(message = "医生姓名不能为空。")
    private String name;
    private String code;
    private Integer sex;
    private String sexName;
    @NotBlank(message = "医生职称不能为空。")
    private String titleCode;
    private String titleName;
    @NotBlank(message = "医生所属科室不能为空。")
    private String deptCode;
    private String deptName;
    @NotBlank(message = "医生擅长不能为空。")
    private String specialty;
    private String introduction;
    private String portrait;
    private Integer wxHomepageFlag;
    private Integer wxHomepageOrder;

    public String getSexName() {
        if (null == sex) {
            return "未知";
        }
        return sex == 1 ? "男" : "女";
    }
}
