package com.zd.system.api.domain;

import com.zd.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.BeanUtils;

import java.util.Optional;


/**
 * 教职工列表VO
 *
 * @Author: zhoupan
 * @Date: 2021/09/11/11:14
 * @Description:
 */
@ApiModel("教职工列表VO")
public class TeacherListVO {

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    /**
     * 部门ID
     */
    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    /**
     * 部门名称
     */
    @ApiModelProperty(value = "所属院系")
    @Excel(name = "所属院系", type = Excel.Type.EXPORT, isRequired = true)
    private String deptName;
    /**
     * 工号
     */
    @ApiModelProperty(value = "工号")
    @Excel(name = "工号", type = Excel.Type.EXPORT)
    private String userName;
    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户姓名")
    @Excel(name = "姓名", type = Excel.Type.EXPORT)
    private String nickName;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码")
    @Excel(name = "联系方式", type = Excel.Type.EXPORT)
    private String phonenumber;

    /**
     * 用户性别
     */
    @ApiModelProperty(value = "用户性别")
    private String sex;

    /**
     * 职称（教授，助教）
     */
    @ApiModelProperty(value = "职称（教授，助教）")
    @Excel(name = "职称", type = Excel.Type.EXPORT,dictLable="professional")
    private String position;
    /**
     * 工作性质（0，非在编  1，在编）
     */
    @Excel(name = "工作性质", type = Excel.Type.EXPORT,dictLable="work_class")
    @ApiModelProperty(value = "工作性质")
    private String nature;


    /**
     * 管理实验室数量
     */
    @Excel(name = "管理实验室数量", type = Excel.Type.EXPORT)
    @ApiModelProperty(value = "管理实验室数量")
    private Integer manageSubCount;


    public TeacherListVO(SysUser sysUser) {
        BeanUtils.copyProperties(sysUser, this);
        this.deptName = sysUser.getDept() == null ? null : sysUser.getDept().getDeptName();
    }

    public Long getUserId() {
        return userId;
    }


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

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPhonenumber() {
        return phonenumber;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber;
    }

    public String getSex() {
        return sex;
    }

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

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getNature() {
        return nature;
    }

    public void setNature(String nature) {
        this.nature = nature;
    }

    public Integer getManageSubCount() {
        return manageSubCount;
    }

    public void setManageSubCount(Integer manageSubCount) {
        this.manageSubCount = manageSubCount;
    }
}
