package com.ssj.service.conch.schoolmaster.dto;


import com.ssj.service.conch.utils.ParseUtil;

import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

public class TeacherDto implements Serializable {
    private static final long serialVersionUID = 1L;

    private String teacherId;
    private int isMyTeacher;		//是否自己老师, 1是 0否
    private int teacherType;	    //老师类型 1：在馆老师 2：一对一授课老师
    private String teacherName;     //老师姓名
    private String weChatNickname;  //微信昵称
    private String teacherImg;		//老师头像
    private int isWorking;		    //是否在岗
    private int isFreeTime = 1;		    //是否有空档
    private int studentCount;	    //学员数量
    private int homeworkFeedbackCount;     //作业反馈数量
    private String libraryName;    	//服务线下馆名称
    private int schoolAge;	        //教龄
    private int numClasses;    	    //授课次数
    private int sex;                //性别 1男 2女 0未知
    private String subjectName;     //教学科目集合
    private List<String> teacherLabels;	//老师标签集合,注册老师，明星老师
    private String parentsPraise = "0";        //家长好评度
    private String phone;               //老师电话
    private List<StudentDto> studentList;   //学生列表

    public TeacherDto (){
        this.teacherLabels = new ArrayList<String>();
        studentList = new ArrayList<StudentDto>();
    }

    public String getTeacherId() {
        return teacherId;
    }

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

    public int getIsMyTeacher() {
        return isMyTeacher;
    }

    public void setIsMyTeacher(int isMyTeacher) {
        this.isMyTeacher = isMyTeacher;
    }

    public int getTeacherType() {
        return teacherType;
    }

    public void setTeacherType(int teacherType) {
        this.teacherType = teacherType;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = ParseUtil.getName(teacherName, this.getTeacherId());
    }

    public String getWeChatNickname() {
        return weChatNickname;
    }

    public void setWeChatNickname(String weChatNickname) {
        this.weChatNickname = weChatNickname;
    }

    public String getTeacherImg() {
        return teacherImg;
    }


    public void setTeacherImg(String teacherImg) {
        this.teacherImg = teacherImg;
    }

    public int getIsWorking() {
        return isWorking;
    }

    public void setIsWorking(int isWorking) {
        this.isWorking = isWorking;
    }

    public int getIsFreeTime() {
        return isFreeTime;
    }

    public void setIsFreeTime(int isFreeTime) {
        this.isFreeTime = isFreeTime;
    }

    public int getStudentCount() {
        return studentCount;
    }

    public void setStudentCount(int studentCount) {
        this.studentCount = studentCount;
    }

    public int getHomeworkFeedbackCount() {
        return homeworkFeedbackCount;
    }

    public void setHomeworkFeedbackCount(int homeworkFeedbackCount) {
        this.homeworkFeedbackCount = homeworkFeedbackCount;
    }

    public String getLibraryName() {
        return libraryName;
    }

    public void setLibraryName(String libraryName) {
        this.libraryName = libraryName;
    }

    public int getSchoolAge() {
        return schoolAge;
    }

    public void setSchoolAge(int schoolAge) {
        this.schoolAge = schoolAge;
    }

    public int getNumClasses() {
        return numClasses;
    }

    public void setNumClasses(int numClasses) {
        this.numClasses = numClasses;
    }

    public int getSex() {
        return sex;
    }

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

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public List<String> getTeacherLabels() {
        return teacherLabels;
    }

    public void setTeacherLabels(List<String> teacherLabels) {
        this.teacherLabels = teacherLabels;
    }

    public String getParentsPraise() {
        return parentsPraise;
    }

    public void setParentsPraise(float parentsPraise) {
        if (parentsPraise > 0f){
            DecimalFormat df1 = new DecimalFormat("####.0");
            this.parentsPraise = df1.format(parentsPraise);
        }
    }

    public void setParentsPraise(int parentsPraise) {
        this.parentsPraise = parentsPraise + "";
    }

    public String getPhone() {
        return phone;
    }

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

    public void addLabel (String label) {
        teacherLabels.add(label);
    }

    public List<StudentDto> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<StudentDto> studentList) {
        this.studentList = studentList;
    }

    public void addStudent (StudentDto stu) {
        this.studentList.add(stu);
    }
}
