package com.jeesharp.business.modules.coupon.dto;

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

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 优惠券结账上下文：各业务线下单/试算时传入，用于场景与范围匹配及抵扣计算。
 *
 * @author jeesharp
 * @since 2026-06-05
 */
@Data
@Schema(description = "优惠券结账上下文")
public class CouponCheckoutContextDTO {

    @Schema(description = "会员ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private String memberId;

    @Schema(description = "使用场景编号，如 MALL、HOTEL、FOOD")
    private String sceneCode;

    @Schema(description = "客户端平台：MINI、APP、H5")
    private String platform;

    @Schema(description = "参与券门槛与抵扣计算的订单金额（元）", requiredMode = Schema.RequiredMode.REQUIRED)
    private BigDecimal orderAmount;

    @Schema(description = "订单主数据 ID 列表：SPU/房型/套餐/票种等")
    private List<String> scopeItemIds = new ArrayList<>();

    @Schema(description = "商品分类 ID 列表（商城等场景）")
    private List<String> categoryIds = new ArrayList<>();

    @Schema(description = "商品品牌 ID 列表（商城等场景）")
    private List<String> brandIds = new ArrayList<>();

    @Schema(description = "会员等级编码；未传时由券模块按会员主数据解析")
    private String memberLevelCode;
}
