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

import com.dayaedu.cbs.common.enums.school.EKnowledgeType;
import com.dayaedu.cbs.common.enums.school.EMaterialRefType;
import com.dayaedu.cbs.common.enums.school.EMaterialType;
import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsMaterialRefWrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

public class LessonCoursewareDetailWrapper {


    @Data
    @ApiModel(" LessonCoursewareDetail-课件内容")
    public static class LessonCoursewareDetail {
        @ApiModelProperty("主键ID")
        private String id;
        @ApiModelProperty("课件编号")
        private Long lessonCoursewareId;
        @ApiModelProperty("课时名称")
        private String name;
        @ApiModelProperty("课时目标描述")
        private String lessonTargetDesc;
        @ApiModelProperty("课后训练编号")
        private Long lessonTrainingId;
        @ApiModelProperty("课后训练名称")
        private String lessonTrainingName;
        @ApiModelProperty("课程时长（秒）")
        private Integer lessonDurationSecond;
        @ApiModelProperty("课程排序")
        private Integer lessonOrder;
        @ApiModelProperty("是否锁定")
        private Boolean lockFlag;
        @ApiModelProperty("是否需要锁定课件")
        private Boolean lockEnable;
        @ApiModelProperty("创建时间")
        private Date createTime;
        @ApiModelProperty("更新时间")
        private Date updateTime;
        private String knowledgePointIds;
        @ApiModelProperty("可见范围,0:所有人课件，1：仅VIP学生可见")
        private Integer accessScope;
        @ApiModelProperty("知识点")
        private List<KnowledgePointSmall> knowledgePointList;
        private List<Long> lessonCoursewareIds;
        private List<Long> lessonCoursewareDetailIds;
    }

    @Data
    @ApiModel(" KnowledgePointSmall-知识点")
    public static class KnowledgePointSmall {
        @ApiModelProperty("知识点编号")
        private Long id;
        @ApiModelProperty("排序")
        private Integer sortNo;
        @ApiModelProperty("知识点名称")
        private String name;
        @ApiModelProperty("建议学习时长")
        private Integer totalMaterialTimeSecond = 0;
        @ApiModelProperty("素材")
        private List<MaterialSmall> materialList;
        @ApiModelProperty("子节点")
        private List<KnowledgePointSmall> children;
    }

    @Data
    @ApiModel(" MaterialSmall-素材")
    public static class MaterialSmall {
        @ApiModelProperty("素材编号")
        private Long id;
        @ApiModelProperty("素材知识点关联编号")
        private Long knowledgePointMaterialRelationId;
        @ApiModelProperty("知识点编号")
        private Long knowledgePointId;
        @ApiModelProperty("素材名称")
        private String name;
        @ApiModelProperty("分段编号")
        private String sn;
        @ApiModelProperty("课程类型")
        private String courseTypeCode;
        @ApiModelProperty("素材时长")
        private Integer adviseStudyTimeSecond;
        @ApiModelProperty("素材类型")
        private EMaterialType type;
        @ApiModelProperty("素材类型-兼容管乐迷")
        private String typeCode;
        @ApiModelProperty("视频、图片链接或者是曲目编号")
        private String content;
        @ApiModelProperty("更新时间")
        private Date updateTime;



        @ApiModelProperty("阶段目标")
        private String phaseGoals;

        @ApiModelProperty("检查事项")
        private String checkItem;
        
        @ApiModelProperty("关联资源数据")
        private List<AddMaterialRef> materialRefs;

//        @ApiModelProperty("状态")
//        private boolean status = true;
    }

    @Data
    @ApiModel(" AddMaterialRef-素材关联")
    public static class AddMaterialRef {
        @ApiModelProperty("关联素材ID")
        private Long resourceId;
        @ApiModelProperty("类型，MUSIC,MATERIAL")
        private EKnowledgeType knowledgeType;
        @ApiModelProperty("关联类型，强：STRONG,弱：WEAK")
        private EMaterialRefType refType;
        @ApiModelProperty("资源名称")
        private String resourceName;
        @ApiModelProperty("资源信息")
        private CbsMaterialRefWrapper.RelateMaterialInfo relateMaterialInfo;

        @ApiModelProperty("关联素材ID")
        private String resourceIdStr;
    }


    @Data
    public static class RefLevelDetailInfo{
        @ApiModelProperty("课件ID")
        private String id;

        @ApiModelProperty("教材ID")
        private String lessonCoursewareId;
        @ApiModelProperty("教材名称")
        private String lessonCoursewareName;


        @ApiModelProperty("封面")
        private String coverImg;

        @ApiModelProperty("课程类型")
        private String courseTypeCode;

        @ApiModelProperty("是否锁定")
        private Boolean lockFlag;

        @ApiModelProperty("是否当前使用")
        private Boolean useFlag;

    }


    @Data
    public static class RefLevelQuery {

        @ApiModelProperty(value = "课件详情ID",required = true)
        private Long lessonCoursewareDetailId;

        @ApiModelProperty(value = "机构ID",hidden = true)
        private Long tenantId;
    }
}
