package com.starry.admin.modules.blindbox.module.dto;

import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 盲盒抽奖候选项，封装奖池记录必要信息。
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BlindBoxCandidate {

    /**
     * 奖池记录主键。
     */
    private Long poolId;

    private String tenantId;

    private String blindBoxId;

    private String rewardGiftId;

    private BigDecimal rewardPrice;

    private int weight;

    /**
     * 剩余库存，null 表示不限量。
     */
    private Integer remainingStock;

    public static BlindBoxCandidate of(
            Long poolId,
            String tenantId,
            String blindBoxId,
            String rewardGiftId,
            BigDecimal rewardPrice,
            int weight,
            Integer remainingStock) {
        return new BlindBoxCandidate(poolId, tenantId, blindBoxId, rewardGiftId, rewardPrice, weight, remainingStock);
    }
}
