package com.dora.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 课程列表项DTO
 */
@Data
@Schema(description = "课程列表项信息")
public class CourseListItemDto {
    
    /**
     * 课程ID
     */
    @Schema(description = "课程ID", example = "1")
    private Long id;
    
    /**
     * 课程标题
     */
    @Schema(description = "课程标题", example = "AI图像处理入门课程")
    private String title;
    
    /**
     * 课程描述
     */
    @Schema(description = "课程描述", example = "学习AI图像处理的基础知识和实践技巧")
    private String description;
    
    /**
     * 封面图URL
     */
    @Schema(description = "封面图URL", example = "https://example.com/cover1.jpg")
    private String coverUrl;
    
    /**
     * 价格
     */
    @Schema(description = "价格", example = "29.99")
    private BigDecimal price;
    
    /**
     * 访问级别
     */
    @Schema(description = "访问级别", example = "1")
    private Integer level;
    
    /**
     * 分类
     */
    @Schema(description = "分类", example = "人工智能")
    private String category;
    
    /**
     * 课程时长
     */
    @Schema(description = "课程时长", example = "15:30")
    private String duration;
    
    /**
     * 观看次数
     */
    @Schema(description = "观看次数", example = "12500")
    private Integer viewCount;
    
    /**
     * 点赞数
     */
    @Schema(description = "点赞数", example = "2300")
    private Integer likeCount;
    
    /**
     * 评论数
     */
    @Schema(description = "评论数", example = "856")
    private Integer commentCount;
    
    /**
     * 是否免费
     */
    @Schema(description = "是否免费", example = "false")
    private Boolean isFree;
    
    /**
     * VIP类型
     */
    @Schema(description = "VIP类型", example = "normal")
    private String vipType;
    
    /**
     * 创建者信息
     */
    @Schema(description = "创建者信息")
    private CreatorDto creator;
    
    /**
     * 创建时间
     */
    @Schema(description = "创建时间", example = "2024-01-15T10:30:00")
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    @Schema(description = "更新时间", example = "2024-01-15T10:30:00")
    private LocalDateTime updateTime;
    
    /**
     * 创建者DTO
     */
    @Data
    @Schema(description = "创建者信息")
    public static class CreatorDto {
        @Schema(description = "创建者ID", example = "17543607206742139")
        private String id;
        
        @Schema(description = "创建者用户名", example = "张三")
        private String username;
        
        @Schema(description = "创建者头像URL", example = "https://example.com/avatar1.jpg")
        private String avatarUrl;
    }
} 