package jnpf.model.cultivate.event.dto.course;

import jnpf.model.cultivate.vo.chapter.FtbCultivateChapterTestResultVO;
import lombok.Data;

import java.util.List;

/**
 * 人员课程进度学习
 *
 * @author wangchunxiang
 * @date 2024/09/18
 */
@Data
public abstract class CourseProcessLearn {
    /**
     * 用户id
     */
    private String userId;
    /**
     * 课程主键id
     */
    private String courseId;
    /**
     * 章节主键id
     */
    private String chapterId;
    /**
     * 学习时长,单位秒
     */
    private Integer duration;


    /**
     * 触发类型：0岗位学习，1通用课程，2任务学习
     */
    private Integer studyType;
    /**
     * 关联的业务id
     */
    private String relationBusinessId;

    /**
     * 随堂测试结果，开启了随堂测试才传值
     */
    private final List<FtbCultivateChapterTestResultVO> ftbChapterTestDTOs;

    public CourseProcessLearn(String userId, String courseId, String chapterId, Integer duration, List<FtbCultivateChapterTestResultVO> ftbChapterTestDTOs) {
        this.userId = userId;
        this.courseId = courseId;
        this.chapterId = chapterId;
        this.duration = duration;
        this.ftbChapterTestDTOs = ftbChapterTestDTOs;
    }

    public CourseProcessLearn(String userId, String courseId, String chapterId, Integer duration, List<FtbCultivateChapterTestResultVO> ftbChapterTestDTOs, Integer studyType,String relationBusinessId) {
        this.userId = userId;
        this.courseId = courseId;
        this.chapterId = chapterId;
        this.duration = duration;
        this.ftbChapterTestDTOs = ftbChapterTestDTOs;
        this.studyType = studyType;
        this.relationBusinessId = relationBusinessId;
    }

}
