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

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

import java.math.BigDecimal;

/**
 * 下单冻结会员券命令，与结账上下文一并传入以保证冻结前规则一致。
 *
 * @author jeesharp
 * @since 2026-06-05
 */
@Data
@Schema(description = "优惠券冻结命令")
public class CouponFreezeCommandDTO {

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

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

    @Schema(description = "业务订单ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private String orderId;

    @Schema(description = "业务订单号")
    private String orderNo;

    @Schema(description = "结账上下文（与试算一致）", requiredMode = Schema.RequiredMode.REQUIRED)
    private CouponCheckoutContextDTO checkoutContext;

    @Schema(description = "前端展示的抵扣金额，用于防篡改校验")
    private BigDecimal expectedDiscount;

    @Schema(description = "冻结原因说明")
    private String freezeReason;
}
