package com.ssj.service.kmt.exercisesys.dto;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Author: chchen
 * @Description
 * @Date Create in 16:00 2020/5/20
 * @Modified By
 */
public class TeacherInfoDto implements Serializable {

    private static final long serialVersionUID = 7774075479952665380L;

    private String teacherId;
    private String image;
    private String name;

    /**
     * 科目
     */
    private String subject;

    @JSONField(serialize = false)
    private Integer isBanned;

    @JSONField(serialize = false)
    private Integer isCancelled;

    @JSONField(serialize = false)
    private Integer isFormal;

    /**
     * 角色状态 1考核中，2在职， 3已冻结，4已注销
     */
    private Integer teacherWorkingType;

    public Integer getTeacherWorkingType() {
        if (teacherWorkingType != null) {
            return teacherWorkingType;
        }

        if (Objects.equals(isCancelled, 1)) {
            teacherWorkingType = 4;
        } else if (Objects.equals(isBanned, 1)) {
            teacherWorkingType = 3;
        } else if (Objects.equals(isFormal, 1)) {
            teacherWorkingType = 2;
        } else {
            teacherWorkingType = 1;
        }

        return teacherWorkingType;
    }
    public void setTeacherWorkingType(Integer teacherWorkingType) {
        this.teacherWorkingType = teacherWorkingType;
    }

    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getName() {
        return name;
    }

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

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Integer getIsBanned() {
        return isBanned;
    }

    public void setIsBanned(Integer isBanned) {
        this.isBanned = isBanned;
    }

    public Integer getIsCancelled() {
        return isCancelled;
    }

    public void setIsCancelled(Integer isCancelled) {
        this.isCancelled = isCancelled;
    }

    public Integer getIsFormal() {
        return isFormal;
    }

    public void setIsFormal(Integer isFormal) {
        this.isFormal = isFormal;
    }
}
