package com.kt.event.eventservice.application.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

/**
 * AI 추천 선택 요청 DTO
 *
 * AI가 생성한 추천 중 하나를 선택하고 커스터마이징합니다.
 *
 * @author Event Service Team
 * @version 1.0.0
 * @since 2025-10-27
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "AI 추천 선택 요청")
public class SelectRecommendationRequest {

    @NotNull(message = "추천 ID는 필수입니다.")
    @Schema(description = "선택한 추천 ID", required = true, example = "rec_20250124_001")
    private String recommendationId;

    @Valid
    @Schema(description = "커스터마이징 항목")
    private Customizations customizations;

    /**
     * 커스터마이징 항목
     */
    @Getter
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    @Schema(description = "커스터마이징 항목")
    public static class Customizations {

        @Schema(description = "수정된 이벤트명", example = "봄맞이 특별 할인 이벤트")
        private String eventName;

        @Schema(description = "수정된 설명", example = "봄을 맞이하여 전 메뉴 20% 할인")
        private String description;

        @Schema(description = "수정된 시작일", example = "2025-03-01")
        private LocalDate startDate;

        @Schema(description = "수정된 종료일", example = "2025-03-31")
        private LocalDate endDate;

        @Schema(description = "수정된 할인율", example = "20")
        private Integer discountRate;
    }
}
