package com.ruoyi.bst.vipUser.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

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

/**
 * 用户卡券对象 bst_vip_user
 *
 * @author ruoyi
 * @date 2025-05-26
 */
@Data
public class VipUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "卡券ID")
    @ApiModelProperty("卡券ID")
    private Long vipId;

    @Excel(name = "运营区ID")
    @ApiModelProperty("运营区ID")
    private Long areaId;

    @Excel(name = "会员卡名称")
    @ApiModelProperty("会员卡名称")
    private String name;

    @Excel(name = "卡类型")
    @ApiModelProperty("卡类型")
    private String type;

    @Excel(name = "抵扣金额/折扣率/储值金额")
    @ApiModelProperty("抵扣金额/折扣率/储值金额")
    private BigDecimal discount;

    @Excel(name = "有效期", readConverterExp = "起=始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("有效期")
    private LocalDateTime startTime;

    @Excel(name = "有效期", readConverterExp = "结=束")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("有效期")
    private LocalDateTime endTime;

    @Excel(name = "是否有使用限制")
    @ApiModelProperty("是否有使用限制")
    private Boolean enableLimit;

    @Excel(name = "剩余总次数")
    @ApiModelProperty("剩余总次数")
    private Integer surplusTotal;

    @Excel(name = "限制频率次数")
    @ApiModelProperty("限制频率次数")
    private Integer limitCount;

    @Excel(name = "限制频率周期")
    @ApiModelProperty("限制频率周期")
    private Integer limitRound;

    @Excel(name = "限制频率单位")
    @ApiModelProperty("限制频率单位")
    private String limitUnit;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下次重置计数时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("下次重置计数时间")
    private LocalDateTime nextResetTime;

    @Excel(name = "当前周期已使用次数")
    @ApiModelProperty("当前周期已使用次数")
    private Integer roundCount;

    @Excel(name = "使用门槛")
    @ApiModelProperty("使用门槛")
    private BigDecimal minAmount;
}
