package com.ynfy.buss.course.course.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ynfy.buss.course.coursecatalog.entity.CourseCatalog;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: course
 * @Author: jeecg-boot
 * @Date: 2023-10-25
 * @Version: V1.0
 */
@Data
@TableName("course")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "course对象", description = "course")
public class Course implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
    /**
     * 课程名称
     */
    @Excel(name = "课程名称", width = 15)
    @ApiModelProperty(value = "课程名称")
    private String name;
    /**
     * 课程分类id
     */
    @Excel(name = "课程分类id", width = 15)
    @ApiModelProperty(value = "课程分类id")
    private String categoryId;

    /**
     * 课程分类名称
     */
    @Excel(name = "课程分类名称", width = 15)
    @ApiModelProperty(value = "课程分类名称")
    @TableField(exist = false)
    private String categoryName;

    /**
     * 课程介绍
     */
    @Excel(name = "课程介绍", width = 15)
    @ApiModelProperty(value = "课程介绍")
    private String description;
    /**
     * 是否免费
     */
    @Excel(name = "是否免费", width = 15)
    @ApiModelProperty(value = "是否免费")
    private Boolean isFree;
    /**
     * 价格
     */
    @Excel(name = "价格", width = 15)
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
    /**
     * 封面
     */
    @Excel(name = "封面", width = 15)
    @ApiModelProperty(value = "封面")
    private String cover;
    /**
     * 课时
     */
    @Excel(name = "课时", width = 15)
    @ApiModelProperty(value = "课时")
    private String classHour;
    /**
     * 开始时间
     */
    @Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
    /**
     * 截止时间
     */
    @Excel(name = "截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "截止时间")
    private Date endTime;
    /**
     * 是否必修
     */
    @Excel(name = "是否必修", width = 15)
    @ApiModelProperty(value = "是否必修")
    private Boolean mustLearn;

    /**
     * 课程id
     */
    @Excel(name = "课程id", width = 15)
    @ApiModelProperty(value = "课程id")
    private String examId;

    /**
     * 课程名称
     */
    @Excel(name = "课程名称", width = 15)
    @ApiModelProperty(value = "课程名称")
    @TableField(exist = false)
    private String examTitle;

    /**
     * 学习权限 1公开2部门3定员
     */
    @Excel(name = "学习权限", width = 15)
    @ApiModelProperty(value = "学习权限")
    @Dict(dicCode = "course_open_type")
    private Integer openType;
    /**
     * 学员
     */
    @Excel(name = "学员", width = 15)
    @ApiModelProperty(value = "学员")
    private String learner;

    /**
     * 学习人数
     */
    @Excel(name = "学习人数", width = 15)
    @ApiModelProperty(value = "学习人数")
    private Integer learnerNumber;

    /**
     * 离开多少分钟弹窗
     */
    @Excel(name = "离开多少分钟弹窗", width = 15)
    @ApiModelProperty(value = "离开多少分钟弹窗")
    private Integer leaveTimeAlert;
    /**
     * 视频是否禁止拖动
     */
    @Excel(name = "视频是否禁止拖动", width = 15)
    @ApiModelProperty(value = "视频是否禁止拖动")
    private Boolean videoNodragg;
    /**
     * 任务是否顺序学习
     */
    @Excel(name = "任务是否顺序学习", width = 15)
    @ApiModelProperty(value = "任务是否顺序学习")
    private Boolean taskSequeUnlock;

    /**
     * 弹窗防呆校验
     */
    @Excel(name = "弹窗防呆校验", width = 15)
    @ApiModelProperty(value = "弹窗防呆校验")
    private Boolean leaveOn;

    /**
     * 讲师id
     */
    @Excel(name = "讲师id", width = 15)
    @ApiModelProperty(value = "讲师id")
    private String teacherId;

    /**
     * 讲师姓名
     */
    @Excel(name = "讲师姓名", width = 15)
    @ApiModelProperty(value = "讲师姓名")
    @TableField(exist = false)
    private String teacherName;

    @Excel(name = "讲师介绍", width = 15)
    @ApiModelProperty(value = "讲师介绍")
    @TableField(exist = false)
    private String teacherIntroduce;

    @Excel(name = "讲师头像", width = 15)
    @ApiModelProperty(value = "讲师头像")
    @TableField(exist = false)
    private String teacherAvatar;

    @Excel(name = "讲师岗位", width = 15)
    @ApiModelProperty(value = "讲师岗位")
    @TableField(exist = false)
    private String teacherPost;

    /**
     * createTime
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * createBy
     */
    @ApiModelProperty(value = "createBy")
    private String createBy;
    /**
     * updateTime
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;
    /**
     * updateBy
     */
    @ApiModelProperty(value = "updateBy")
    private String updateBy;

    /**
     * 目录
     */
    @TableField(exist = false)
    private List<CourseCatalog> catalogList;

    /**
     * 任务数
     */
    @TableField(exist = false)
    private Integer taskNum;

    /**
     * 已经学完的
     */
    @TableField(exist = false)
    private Integer finishNum;

    /**
     * 课程学习进度
     */
    @TableField(exist = false)
    private Double courseStudyProcess;
}
