package com.dora.entity;

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

/**
 * 课程实体类
 */
@Data
@Schema(description = "课程实体")
public class Course {
    
    /**
     * 主键
     */
    @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;
    
    /**
     * 详情图集（JSON格式存储多张图片URL）
     */
    @Schema(description = "详情图集", example = "[\"https://example.com/detail1.jpg\", \"https://example.com/detail2.jpg\"]")
    private String detailGallery;
    
    /**
     * 价格
     */
    @Schema(description = "价格", example = "29.99")
    private BigDecimal price;
    
    /**
     * 访问课程所需的最低用户级别
     */
    @Schema(description = "访问课程所需的最低用户级别", example = "1")
    private Integer level;
    
    /**
     * 课程分类
     */
    @Schema(description = "课程分类", example = "人工智能")
    private String category;
    
    /**
     * 关联类目ID
     */
    @Schema(description = "关联类目ID", example = "1")
    private Long categoryId;
    
    /**
     * 审核状态(0待审核/1通过/2拒绝)
     */
    @Schema(description = "审核状态(0待审核/1通过/2拒绝)", example = "1")
    private Integer auditStatus;
    
    /**
     * 拒绝原因
     */
    @Schema(description = "拒绝原因", example = "内容不符合规范")
    private String rejectReason;
    
    /**
     * 审核时间
     */
    @Schema(description = "审核时间", example = "2024-01-15T10:30:00")
    private LocalDateTime reviewTime;
    
    /**
     * 创建者ID
     */
    @Schema(description = "创建者ID", example = "1")
    private Long userId;
    
    /**
     * 是否免费(0收费/1免费)
     */
    @Schema(description = "是否免费(0收费/1免费)", example = "0")
    private Integer isFree;
    
    /**
     * 创建时间
     */
    @Schema(description = "创建时间", example = "2024-01-15T10:30:00")
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    @Schema(description = "更新时间", example = "2024-01-15T10:30:00")
    private LocalDateTime updateTime;
    
    /**
     * 逻辑删除标识
     */
    @Schema(description = "逻辑删除标识", example = "0")
    private Integer isDeleted;

        /**
         * 外部课程ID（前端指定，用于无返回创建场景）
         */
        @Schema(description = "外部课程ID（前端指定）", example = "course-abc-001")
        private String externalId;
} 