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

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Data;

/**
 * 积分扣减请求（兑换、人工扣减等），供 {@link com.jeesharp.business.modules.member.api.MemberPointsApi} 使用。
 *
 * @author jeesharp
 * @since 2026-06-24
 */
@Data
@Builder
@Schema(description = "积分扣减请求")
public class MemberPointsDeductDTO {

    @NotBlank(message = "会员ID不能为空")
    @Schema(description = "会员ID", required = true)
    private String memberId;

    @NotBlank(message = "场景编码不能为空")
    @Schema(description = "场景编码", required = true)
    private String sceneCode;

    @NotBlank(message = "业务幂等键不能为空")
    @Schema(description = "业务幂等键", required = true)
    private String bizId;

    @Schema(description = "业务编号")
    private String bizNo;

    @NotNull(message = "扣减积分不能为空")
    @Min(value = 1, message = "扣减积分必须大于0")
    @Schema(description = "扣减积分数量", required = true)
    private Integer points;

    @Schema(description = "业务描述")
    private String bizDesc;

    @Schema(description = "操作来源：SYSTEM/ADMIN/APP/MINI")
    private String operateSource;
}
