package com.yonge.cooleshow.biz.dal.wrapper;

import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareDetailWrapper;
import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareWrapper;
import com.microsvc.toolkit.common.response.paging.QueryInfo;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 课件教材
 */
@ApiModel(value = "LessonCoursewareWrapper对象", description = "课件教材")
public class LessonCoursewareWrapper {

    @Data
	@Builder
    @AllArgsConstructor
    @NoArgsConstructor
    @ApiModel("课件教材分页查询")
    public static class LessonCoursewareQuery implements QueryInfo {
        private Integer page = 1;

        private Integer rows = 20;

        @ApiModelProperty("声部")
        private Integer subjectId;

        @ApiModelProperty("启用状态")
        private Boolean enable;
    }

    @Data
	@Builder
    @AllArgsConstructor
    @NoArgsConstructor
    @ApiModel("课件教材dto")
    public static class LessonCourseware extends CbsLessonCoursewareWrapper.LessonCourseware {

        @ApiModelProperty("是否生效中")
        private Boolean play = false;

    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel("CourseScheduleCoursewareDetail-课程计划课件详情")
    public static class CourseScheduleCoursewareDetail {

        // 课程计划编号
        @ApiModelProperty("课程计划编号")
        private Long lessonCoursewareId;

        // 课程计划编号
        @ApiModelProperty("课程计划详情编号")
        private Long lessonCoursewareDetailId;

        @ApiModelProperty("课程计划详情编号")
        private String coursewareDetailId;

        // 课件名称
        @ApiModelProperty("课件详情名称")
        private String coursewareDetailName;

        @ApiModelProperty("知识点")
        private List<CbsLessonCoursewareDetailWrapper.KnowledgePointSmall> knowledgePointList;

        public void setLessonCoursewareDetailId(Long lessonCoursewareDetailId) {
        	this.lessonCoursewareDetailId = lessonCoursewareDetailId;
            this.coursewareDetailId = String.valueOf(lessonCoursewareDetailId);
        }

    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel("CourseScheduleCoursewareDetail-课件教材")
    public static class LessonCourseQuery {

        // 课程计划编号
        @ApiModelProperty("课程计划编号")
        @NotNull(message = "课件教材编号不能为空")
        private Long lessonCoursewareId;

        @ApiModelProperty("机构专辑ID")
        private Long albumId;

        @ApiModelProperty(value = "客户端",hidden = true)
        private ClientEnum client;

        @ApiModelProperty(value = "用户id",hidden = true)
        private Long userId;
    }

}