package com.ssj.service.kmt.dto;


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

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

    private String vipId;
    private String name;
    private String grade;
    private int version;
    private int feedbackCount = 0;
    private String homeworkId;
    private List<ProblemDto> pList;
    /**
     * 1有补拍
     */
    private int type;

    public StudentProblemDto () {
        pList = new ArrayList<ProblemDto>();
    }

    public String getVipId() {
        return vipId;
    }

    public void setVipId(String vipId) {
        this.vipId = vipId;
    }

    public String getName() {
        return name;
    }

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

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public int getFeedbackCount() {
        return feedbackCount;
    }

    public void setFeedbackCount(int feedbackCount) {
        this.feedbackCount = feedbackCount;
    }

    public List<ProblemDto> getpList() {
        return pList;
    }

    public void setpList(List<ProblemDto> pList) {
        this.pList = pList;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public void addProblem (ProblemDto p) {
        if (p.getIsFeedback() == 1){
            this.feedbackCount++;
        }
        pList.add(p);
    }

    public String getHomeworkId() {
        return homeworkId;
    }

    public void setHomeworkId(String homeworkId) {
        this.homeworkId = homeworkId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
