package com.dora.dto;

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

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 礼品码相关DTO
 */
public class GiftCodeDto {

    @Data
    @Schema(description = "礼品码兑换请求")
    public static class RedeemRequest {
        @NotBlank(message = "礼品码不能为空")
        @Size(max = 32, message = "礼品码长度不能超过32位")
        @Schema(description = "礼品码", example = "VIP2024")
        private String code;
    }

    @Data
    @Schema(description = "礼品码兑换响应")
    public static class RedeemResponse {
        @Schema(description = "兑换结果", example = "true")
        private Boolean success;

        @Schema(description = "礼品码类型", example = "2")
        private Integer type;

        @Schema(description = "礼品码名称", example = "VIP会员卡")
        private String name;

        @Schema(description = "积分数量（积分卡）", example = "1000")
        private Integer points;

        @Schema(description = "积分有效期天数", example = "365")
        private Integer pointsExpireDays;

        @Schema(description = "目标角色等级（会员卡）", example = "2")
        private Integer targetRole;

        @Schema(description = "会员有效期天数", example = "30")
        private Integer durationDays;

        @Schema(description = "用户新角色", example = "2")
        private Integer newRole;

        @Schema(description = "用户新积分", example = "1500")
        private Integer newPoints;

        @Schema(description = "用户新积分过期时间", example = "2024-12-31T23:59:59")
        private String newPointsExpiresAt;

        @Schema(description = "用户新会员到期时间", example = "2024-12-31T23:59:59")
        private String newExpiresAt;

        @Schema(description = "消息", example = "兑换成功！您已升级为VIP会员")
        private String message;
    }
} 