package com.seamew.lottery.domain.strategy.model.res;

import com.seamew.lottery.common.Constants;
import com.seamew.lottery.common.Result;
import com.seamew.lottery.domain.strategy.model.vo.DrawAwardVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: seamew
 * @Title: DrawResult
 * @CreateTime: 2023年02月13日 20:41:00
 * @Description: 抽奖结果
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DrawResult extends Result {
    /**
     * 用户ID
     */
    private String uId;

    /**
     * 策略ID
     */
    private Long strategyId;

    /**
     * 中奖状态：0未中奖、1已中奖、2兜底奖 Constants.DrawState
     */
    private Integer drawState = Constants.DrawState.FAIL.getCode();

    /**
     * 中奖奖品信息
     */
    private DrawAwardVO drawAwardInfo;

    /**
     * 库存 Key
     */
    private String stockTokenKey;

    public DrawResult(String code, String info, String uId, Long strategyId, Integer drawState) {
        super(code, info);
        this.uId = uId;
        this.strategyId = strategyId;
        this.drawState = drawState;
    }

    public DrawResult(String code, String info, String uId, Long strategyId, Integer drawState, DrawAwardVO drawAwardInfo, String stockTokenKey) {
        super(code, info);
        this.uId = uId;
        this.strategyId = strategyId;
        this.drawState = drawState;
        this.drawAwardInfo = drawAwardInfo;
        this.stockTokenKey = stockTokenKey;
    }
}
