package beilv.vipCard.domain;

import beilv.common.annotation.Excel;
import beilv.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.type.Alias;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 储值会员卡对象 beilv_vip_card
 *
 * @author LG
 * @date 2025-11-12
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Alias("VipCard")
public class VipCard extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 会员卡号
     */
    private String id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 会员等级
     */
    @Excel(name = "会员等级")
    private String vipLevel;

    /**
     * 卡内余额
     */
    @Excel(name = "卡内余额")
    private BigDecimal balance;

    /**
     * 当前积分
     */
    @Excel(name = "当前积分")
    private BigDecimal score;

    /**
     * 退卡时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "退卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date refundTime;

    /**
     * 会员卡状态
     */
    @Excel(name = "会员卡状态")
    private String cardState;

    private String username;
    private String mobile;

    public VipCard(Long userId, BigDecimal balance, BigDecimal score) {
        this.userId = userId;
        this.balance = balance;
        this.score = score;
    }
}
