package com.ssj.service.conch.curator.request;

import com.ssj.bean.common.framework.core.domain.BaseRequest;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: chchen
 * @Description
 * @Date Create in 15:47 2019/12/24
 * @Modified By
 */
public class CreateTeacherRequest extends BaseRequest {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(name = "name", value = "老师名称", required = true)
    private String name;

    @ApiModelProperty(name = "mobile", value = "老师手机号", required = true)
    private String mobile;

    @ApiModelProperty(name = "subjectList", value = "学科列表", required = true)
    private List<String> subjectList;

    @ApiModelProperty(name = "teacherTypeList", value = "类型列表", required = true)
    private List<String> teacherTypeList;

    @ApiModelProperty(name = "teacherId", value = "老师id", required = false)
    private String teacherId;

    public String getName() {
        return name;
    }

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

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public List<String> getSubjectList() {
        return subjectList;
    }

    public void setSubjectList(List<String> subjectList) {
        this.subjectList = subjectList;
    }

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

    public void setTeacherTypeList(List<String> teacherTypeList) {
        System.out.println(teacherTypeList);
        if (teacherTypeList != null){
            this.teacherTypeList = new ArrayList<>();
            for (String type : teacherTypeList){
                if ("3".equals(type)){
                    this.teacherTypeList.add("10");
                } else  if ("4".equals(type)){
                    this.teacherTypeList.add("15");
                } else {
                    this.teacherTypeList.add(type);
                }
            }
        }
    }

    public String getTeacherId() {
        return teacherId;
    }

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