package com.nanri.aiimage.modules.productrisk.model.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@Schema(description = "保存用户五国处理顺序：至少 1 个、最多 5 个，代码须为 DE、FR、ES、IT、UK，无重复")
public class ProductRiskCountryPreferenceSaveRequest {

    @NotNull(message = "user_id 不能为空")
    @JsonProperty("user_id")
    @Schema(description = "当前用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long userId;

    @NotEmpty(message = "country_codes 不能为空")
    @Size(max = 5, message = "country_codes 最多 5 项")
    @JsonProperty("country_codes")
    @Schema(description = "国家代码列表（与 ProductRiskCountryCode 枚举名一致），顺序即队列处理顺序", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<String> countryCodes = new ArrayList<>();
}
