package com.ssj.bean.kmt.kmt.dto;

import org.apache.commons.lang3.StringUtils;

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

public class LessonGroupDTO implements Serializable {

    private static final long serialVersionUID = -7533013383719455973L;

    private String lessonGroupId;
    private String groupName;
    private String startTime;
    private String endTime;
    private String courseName;
    private Boolean prepared;
    private String groupCourseId;
    private String studentImgUrlStr;

    public String getLessonGroupId() {
        return lessonGroupId;
    }

    public void setLessonGroupId(String lessonGroupId) {
        this.lessonGroupId = lessonGroupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public Boolean getPrepared() {
        return prepared;
    }

    public void setPrepared(Boolean prepared) {
        this.prepared = prepared;
    }

    public String getGroupCourseId() {
        return groupCourseId;
    }

    public void setGroupCourseId(String groupCourseId) {
        this.groupCourseId = groupCourseId;
    }

    public List<String> getStudentImgUrlList() {
        if (StringUtils.isBlank(studentImgUrlStr)) {
            return new ArrayList<>();
        } else {
            List<String> temp = Arrays.asList(studentImgUrlStr.split(","));
            if (temp.size() >= 6) {
                return temp.subList(0, 6);
            } else {
                return temp;
            }
        }
    }

    public void setStudentImgUrlStr(String studentImgUrlStr) {
        this.studentImgUrlStr = studentImgUrlStr;
    }
}
