package com.lesingle.edu.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 课程响应
 * 用于返回课程信息给前端
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "课程响应")
public class CourseResponse {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "租户 ID")
    private Long tenantId;

    @Schema(description = "课程名称")
    private String name;

    @Schema(description = "课程编码")
    private String code;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "封面 URL")
    private String coverUrl;

    @Schema(description = "分类")
    private String category;

    @Schema(description = "年龄范围")
    private String ageRange;

    @Schema(description = "难度等级")
    private String difficultyLevel;

    @Schema(description = "时长（分钟）")
    private Integer durationMinutes;

    @Schema(description = "教学目标")
    private String objectives;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "是否系统课程")
    private Integer isSystem;

    @Schema(description = "核心内容")
    private String coreContent;

    @Schema(description = "课程摘要")
    private String introSummary;

    @Schema(description = "课程亮点")
    private String introHighlights;

    @Schema(description = "课程目标")
    private String introGoals;

    @Schema(description = "内容安排")
    private String introSchedule;

    @Schema(description = "重点难点")
    private String introKeyPoints;

    @Schema(description = "教学方法")
    private String introMethods;

    @Schema(description = "评估方法")
    private String introEvaluation;

    @Schema(description = "注意事项")
    private String introNotes;

    @Schema(description = "进度安排参考数据")
    private String scheduleRefData;

    @Schema(description = "环境创设内容")
    private String environmentConstruction;

    @Schema(description = "主题 ID")
    private Long themeId;

    @Schema(description = "主题名称")
    private String themeName;

    @Schema(description = "主题颜色(hex)，来自主题字典")
    private String themeColor;

    @Schema(description = "绘本名称")
    private String pictureBookName;

    @Schema(description = "封面图片路径")
    private String coverImagePath;

    @Schema(description = "电子书路径")
    private String ebookPaths;

    @Schema(description = "音频路径")
    private String audioPaths;

    @Schema(description = "视频路径")
    private String videoPaths;

    @Schema(description = "其他资源")
    private String otherResources;

    @Schema(description = "PPT 文件路径")
    private String pptPath;

    @Schema(description = "PPT 文件名称")
    private String pptName;

    @Schema(description = "海报路径")
    private String posterPaths;

    @Schema(description = "教学工具")
    private String tools;

    @Schema(description = "学生材料")
    private String studentMaterials;

    @Schema(description = "教案数据")
    private String lessonPlanData;

    @Schema(description = "活动数据")
    private String activitiesData;

    @Schema(description = "评估数据")
    private String assessmentData;

    @Schema(description = "年级标签（规范为数组，与套餐管理适用年级对齐）")
    private String[] gradeTags;

    @Schema(description = "领域标签（规范为数组）")
    private String[] domainTags;

    @Schema(description = "是否有集体课")
    private Integer hasCollectiveLesson;

    @Schema(description = "版本号")
    private String version;

    @Schema(description = "父课程 ID")
    private Long parentId;

    @Schema(description = "是否最新版本")
    private Integer isLatest;

    @Schema(description = "提交时间")
    private LocalDateTime submittedAt;

    @Schema(description = "提交人 ID")
    private Long submittedBy;

    @Schema(description = "审核时间")
    private LocalDateTime reviewedAt;

    @Schema(description = "审核人 ID")
    private Long reviewedBy;

    @Schema(description = "审核意见")
    private String reviewComment;

    @Schema(description = "审核清单")
    private String reviewChecklist;

    @Schema(description = "发布时间")
    private LocalDateTime publishedAt;

    @Schema(description = "使用次数")
    private Integer usageCount;

    @Schema(description = "教师数量")
    private Integer teacherCount;

    @Schema(description = "平均评分")
    private BigDecimal avgRating;

    @Schema(description = "创建人 ID")
    private Long createdBy;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    @Schema(description = "关联的课程环节")
    private List<CourseLessonResponse> courseLessons;

    @Schema(description = "课程环节标签（列表展示用，仅 name 和 lessonType）")
    private List<LessonTagResponse> lessonTags;
}
