package com.hc.business.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;


/**
 * 课程章节表(CourseChapter)实体类
 *
 * @author java
 * @since 2020-11-09 10:04:47
 */


@ApiModel(value = "章节表")
public class CourseChapter implements Serializable {

    private static final long serialVersionUID = 873871660383226119L;


    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键id")
    private Integer courseChapterId;

    /**
     * 章节名字
     */
    @ApiModelProperty(value = "章节名字", required = true)
    @NotNull
    private String chapterName;

    /**
     * 父节点ID
     */
    @ApiModelProperty(value = "父节点ID", required = true)
    @NotNull
    private Integer parentId;

    /**
     * 章节层级
     */
    @ApiModelProperty(value = "章节层级", required = true)
    @NotNull
    private Integer chapterLevel;

    /**
     * 课程ID
     */
    @ApiModelProperty(value = "课程ID", required = true)
    @NotNull
    private Integer courseId;

    /**
     * 构造
     */
    @Transient
    private List<CourseChapter> childChapter;

    @Transient
    private CourseChapterVideo chapterVideo;

    @Transient
    private CourseChapterAnnex courseChapterAnnex;

    @Transient
    private UserVideoPosition userVideoPosition;

    public CourseChapter(Integer courseChapterId, @NotNull String chapterName,
                         @NotNull Integer parentId,
                         @NotNull Integer chapterLevel,
                         @NotNull Integer courseId) {
        this.courseChapterId = courseChapterId;
        this.chapterName = chapterName;
        this.parentId = parentId;
        this.chapterLevel = chapterLevel;
        this.courseId = courseId;
    }

    public CourseChapter() {
    }

    public Integer getCourseChapterId() {
        return courseChapterId;
    }

    public void setCourseChapterId(Integer courseChapterId) {
        this.courseChapterId = courseChapterId;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getChapterLevel() {
        return chapterLevel;
    }

    public void setChapterLevel(Integer chapterLevel) {
        this.chapterLevel = chapterLevel;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public List<CourseChapter> getChildChapter() {
        return childChapter;
    }

    public void setChildChapter(List<CourseChapter> childChapter) {
        this.childChapter = childChapter;
    }

    public CourseChapterVideo getChapterVideo() {
        return chapterVideo;
    }

    public void setChapterVideo(CourseChapterVideo chapterVideo) {
        this.chapterVideo = chapterVideo;
    }

    public CourseChapterAnnex getCourseChapterAnnex() {
        return courseChapterAnnex;
    }

    public void setCourseChapterAnnex(CourseChapterAnnex courseChapterAnnex) {
        this.courseChapterAnnex = courseChapterAnnex;
    }

    public UserVideoPosition getUserVideoPosition() {
        return userVideoPosition;
    }

    public void setUserVideoPosition(UserVideoPosition userVideoPosition) {
        this.userVideoPosition = userVideoPosition;
    }
}