package org.springblade.modules.api.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Author pangqijun
 * Date 2023/5/9
 * Description
 */
@Data
@NoArgsConstructor
public class SignInPrizeVO {
    @ApiModelProperty("天数")
    private Integer days;
    @ApiModelProperty("天数中文描述")
    private String daysDesc;
    @ApiModelProperty("奖励名称")
    private String prizeName;
    @ApiModelProperty("奖励数量")
    private Long prizeNum;
    @ApiModelProperty("奖励类型 1-积分 2-酒")
    private Integer prizeType;
    @ApiModelProperty("是否已签过")
    private boolean isSignIn;

    public SignInPrizeVO(Integer days, Long prizeNum, Integer prizeType, String prizeName) {
        this.days = days;
        this.prizeNum = prizeNum;
        this.prizeType = prizeType;
        this.prizeName = prizeName;
    }

    public SignInPrizeVO(Integer days, Long prizeNum, Integer prizeType) {
        this.days = days;
        this.prizeNum = prizeNum;
        this.prizeType = prizeType;
    }

    public String getDaysDesc() {
        return "第" + days + "天";
    }

    public String getPrizeName() {
        if (this.prizeType == 1) {
            return this.prizeNum + "积分";
        }
        return prizeName;
    }
}
