package com.hc.business.model;

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

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 = "章节表")
@Data
public class ZccmCourseChapter 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<ZccmCourseChapter> childChapter;

    @Transient
    private ZccmCourseChapterVideo chapterVideo;

    @Transient
    private ZccmCourseChapterAnnex courseChapterAnnex;

    @Transient
    private ZccmUserVideoPosition userVideoPosition;

}