package com.lesingle.edu.dto.response;

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

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

/**
 * 资源项响应
 * 用于返回资源项信息给前端
 */
@Data
@Builder
@Schema(description = "资源项响应")
public class ResourceItemResponse {

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

    @Schema(description = "资源库 ID")
    private String libraryId;

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

    @Schema(description = "资源标题")
    private String title;

    @Schema(description = "文件类型 (IMAGE/PDF/VIDEO/AUDIO/PPT/OTHER)")
    private String fileType;

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

    @Schema(description = "文件大小（字节）")
    private Long fileSize;

    @Schema(description = "资源标签")
    private List<String> tags;

    @Schema(description = "所属资源库信息")
    private LibrarySummary library;

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

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

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

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

    /** 资源库简要信息 */
    @Data
    @Builder
    public static class LibrarySummary {
        private Long id;
        private String name;
        private String libraryType;
    }
}
