package com.ssj.bean.conch.curator.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @Author: chchen
 * @Description
 * @Date Create in 15:00 2019/12/24
 * @Modified By
 */
public class CuratorTeacherListDto  implements Serializable {
    private static final long serialVersionUID = 1L;

    private String teacherId;

    private String subject;

    private String name;

    private String imgUrl;

    private String phone;

    private int classSum;

    private List<String> teacherTypeList;

    private List<TeacherDetailClassListDto> list;

    public String getTeacherId() {
        return teacherId;
    }

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


    public String getSubject() {
        return subject;
    }

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

    public String getName() {
        return name;
    }

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

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getPhone() {
        return phone;
    }

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

    public int getClassSum() {
        return classSum;
    }

    public void setClassSum(int classSum) {
        this.classSum = classSum;
    }

    public List<String> getTeacherTypeList() {
        return teacherTypeList;
    }

    public void setTeacherTypeList(String teacherTypeList) {
        if (teacherTypeList != null && teacherTypeList != ""){
            this.teacherTypeList = new ArrayList<>();
            for (String type : Arrays.asList(teacherTypeList.split(","))){
                if ("10".equals(type)){
                    this.teacherTypeList.add("3");
                } else  if ("15".equals(type)){
                    this.teacherTypeList.add("4");
                } else {
                    this.teacherTypeList.add(type);
                }
            }
            Collections.sort(this.teacherTypeList);
        }
    }

    public List<TeacherDetailClassListDto> getList() {
        return list;
    }

    public void setList(List<TeacherDetailClassListDto> list) {
        this.list = list;
    }
}
