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

import com.ssj.conch.constant.CourseConstant;

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

/**
 * @author chchen
 * @date 2018/9/25 17:53
 */
public class HomeworkDataDto implements Serializable {
    private static final long serialVersionUID = 1L;

    private String pushId;

    /**
     * 学生信息
     */
    private StudentInfo childInfo;

    /**
     * 作业登记图片集合
     */
    private List<String> homeworkPicture;

    /**
     * 学习状态列表
     */
    private List<LearningStateDto> learningState;

    /**
     * 老师留言，老师有话说
     */
    private String suggestion;


    private List<SubjectParamDto> subjectDataList;

    public String getPushId() {
        return pushId;
    }

    public void setPushId(String pushId) {
        this.pushId = pushId;
    }

    public StudentInfo getChildInfo() {
        return childInfo;
    }

    public void setChildInfo(StudentInfo childInfo) {
        this.childInfo = childInfo;
    }

    public List<String> getHomeworkPicture() {
		return homeworkPicture;
	}

	public void setHomeworkPicture(List<String> homeworkPicture) {
		this.homeworkPicture = homeworkPicture;
	}

	public List<LearningStateDto> getLearningState() {
        return learningState;
    }

    public void setLearningState(List<LearningStateDto> learningState) {
        this.learningState = learningState;
    }

    public String getSuggestion() {
        return suggestion;
    }

    public void setSuggestion(String suggestion) {
        this.suggestion = suggestion;
    }


    public List<SubjectParamDto> getSubjectDataList() {
        return subjectDataList;
    }

    public void setSubjectDataList(List<SubjectParamDto> subjectDataList) {
        this.subjectDataList = subjectDataList;
    }


    public void addSubjectData (SubjectParamDto spd) {
        if (this.subjectDataList == null) {
            this.subjectDataList = new ArrayList<>();
        }
        this.subjectDataList.add(spd);
    }

    public void initLearningState(){
        if (this.learningState == null){
            this.learningState = new ArrayList<>();
        }
        for (String key : CourseConstant.LABEL_NAME_LIST){
            LearningStateDto item = new LearningStateDto();
            item.setName(key);
            this.learningState.add(item);
        }
    }
}
