package com.dora.dto;

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

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

/**
 * 工作流点赞相关DTO
 */
public class WorkflowLikeDto {

    /**
     * 工作流点赞请求
     */
    @Data
    @Schema(description = "工作流点赞请求")
    public static class LikeRequest {
        @Schema(description = "工作流ID", example = "1")
        private Long workflowId;
    }

    /**
     * 工作流点赞响应
     */
    @Data
    @Schema(description = "工作流点赞响应")
    public static class LikeResponse {
        @Schema(description = "是否成功", example = "true")
        private Boolean success;
        
        @Schema(description = "消息", example = "点赞成功")
        private String message;
        
        @Schema(description = "是否已点赞", example = "true")
        private Boolean isLiked;
        
        @Schema(description = "点赞数量", example = "10")
        private Integer likeCount;
    }

    /**
     * 工作流点赞记录
     */
    @Data
    @Schema(description = "工作流点赞记录")
    public static class LikeRecord {
        @Schema(description = "记录ID", example = "1")
        private Long id;
        
        @Schema(description = "工作流ID", example = "1")
        private Long workflowId;
        
        @Schema(description = "工作流名称", example = "智能图像生成工作流")
        private String workflowName;
        
        @Schema(description = "工作流描述", example = "基于Stable Diffusion的智能图像生成工作流")
        private String workflowDescription;
        
        @Schema(description = "工作流封面", example = "https://example.com/workflow1.jpg")
        private String workflowCover;
        
        @Schema(description = "点赞时间", example = "2024-01-01T12:00:00")
        private LocalDateTime createTime;
    }

    /**
     * 工作流点赞列表响应
     */
    @Data
    @Schema(description = "工作流点赞列表响应")
    public static class LikeListResponse {
        @Schema(description = "是否成功", example = "true")
        private Boolean success;
        
        @Schema(description = "消息", example = "获取成功")
        private String message;
        
        @Schema(description = "点赞记录列表")
        private List<LikeRecord> records;
        
        @Schema(description = "总数量", example = "100")
        private Integer total;
        
        @Schema(description = "当前页码", example = "1")
        private Integer page;
        
        @Schema(description = "每页大小", example = "10")
        private Integer size;
    }

    /**
     * 工作流点赞统计响应
     */
    @Data
    @Schema(description = "工作流点赞统计响应")
    public static class LikeStatsResponse {
        @Schema(description = "是否成功", example = "true")
        private Boolean success;
        
        @Schema(description = "消息", example = "获取成功")
        private String message;
        
        @Schema(description = "用户点赞的工作流数量", example = "50")
        private Integer workflowLikeCount;
    }
} 