package com.dora.dto;

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

import jakarta.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 企业微信二维码相关DTO
 */
public class WechatQrCodeDto {

    private WechatQrCodeDto() {
        // 工具类，隐藏构造函数
    }

    /**
     * 二维码响应DTO
     */
    @Data
    @Schema(description = "企业微信二维码信息")
    public static class QrCodeInfo {
        @Schema(description = "二维码ID")
        private Long id;

        @Schema(description = "二维码图片URL")
        private String qrCodeUrl;

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

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

    /**
     * 二维码列表响应DTO
     */
    @Data
    @Schema(description = "企业微信二维码列表响应")
    public static class QrCodeListResponse {
        @Schema(description = "二维码列表")
        private List<QrCodeInfo> qrCodes;

        @Schema(description = "总数量")
        private Integer total;
    }

    /**
     * 创建二维码请求DTO
     */
    @Data
    @Schema(description = "创建企业微信二维码请求")
    public static class QrCodeCreateRequest {
        @NotBlank(message = "二维码图片URL不能为空")
        @Schema(description = "二维码图片URL")
        private String qrCodeUrl;

        @Schema(description = "二维码描述")
        private String description;
    }

    /**
     * 更新二维码请求DTO
     */
    @Data
    @Schema(description = "更新企业微信二维码请求")
    public static class QrCodeUpdateRequest {
        @Schema(description = "二维码图片URL")
        private String qrCodeUrl;

        @Schema(description = "二维码描述")
        private String description;
    }
}
