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.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 课程视频(CourseChapterVideo)实体类
 *
 * @author java
 * @since 2020-11-09 10:04:54
 */


@ApiModel(value = "章节视频表")
public class CourseChapterVideo implements Serializable {

    private static final long serialVersionUID = -21553514386384145L;


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

    /**
     * 章节id，目前视频直接配置在课程下，允许章节ID=NULL
     */
    @ApiModelProperty(value = "章节id，目前视频直接配置在课程下，允许章节ID=NULL", required = true)
    @NotNull
    private Integer chapterId;

    /**
     * 视频名称
     */
    @ApiModelProperty(value = "视频名称", required = true)
    @NotNull
    private String videoName;

    /**
     * 视频地址
     */
    @ApiModelProperty(value = "视频地址", required = true)
    @NotNull
    private String videoUrl;


    @ApiModelProperty(value = "${column.comment}", required = true)
    private String videoOriUrl;

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

    /**
     * 是否精品课程，精品课程允许试看
     */
    @ApiModelProperty(value = "是否精品课程，精品课程允许试看")
    private Integer isFree;

    /**
     * 试看时间，分钟
     */
    @ApiModelProperty(value = "试看时间，分钟")
    private Integer freeTime;

    public CourseChapterVideo(Integer videoId, @NotNull Integer chapterId,
                              @NotNull String videoName, @NotNull String videoUrl, String videoOriUrl,
                              @NotNull Integer courseId, Integer isFree, Integer freeTime) {
        this.videoId = videoId;
        this.chapterId = chapterId;
        this.videoName = videoName;
        this.videoUrl = videoUrl;
        this.videoOriUrl = videoOriUrl;
        this.courseId = courseId;
        this.isFree = isFree;
        this.freeTime = freeTime;
    }

    public CourseChapterVideo() {
    }

    public Integer getVideoId() {
        return videoId;
    }

    public void setVideoId(Integer videoId) {
        this.videoId = videoId;
    }

    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }

    public String getVideoName() {
        return videoName;
    }

    public void setVideoName(String videoName) {
        this.videoName = videoName;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getVideoOriUrl() {
        return videoOriUrl;
    }

    public void setVideoOriUrl(String videoOriUrl) {
        this.videoOriUrl = videoOriUrl;
    }

    public Integer getCourseId() {
        return courseId;
    }

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

    public Integer getIsFree() {
        return isFree;
    }

    public void setIsFree(Integer isFree) {
        this.isFree = isFree;
    }

    public Integer getFreeTime() {
        return freeTime;
    }

    public void setFreeTime(Integer freeTime) {
        this.freeTime = freeTime;
    }
}