package beilv.usermembershipcard.domain;

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

import java.util.Date;

/**
 * 用户会员卡对象 user_membership_card
 *
 * @author ruoyi
 * @date 2025-01-02
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Alias("UserMembershipCard")
public class UserMembershipCard extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

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

    /**
     * 卡种id
     */
//    @Excel(name = "卡种id")
    private String recordId;

    @Excel(name = "用户账户")
    private String userName;

//    @Excel(name = "姓名")
    private String realName;

    @Excel(name = "手机号码")
    private String mobile;

    @Excel(name = "卡种名称")
    private String cardName;

    /**
     * 总次数
     */
    @Excel(name = "总次数")
    private Integer totalNumber;

    /**
     * 剩余次数
     */
    @Excel(name = "剩余次数")
    private Integer remainingNumber;

    /**
     * 版本
     */
//    @Excel(name = "版本")
    private String version;

    /**
     * 篮球	site_type_basketball
     * 足球	site_type_soccer
     * 羽毛球	site_type_badminton
     */
    private String cardType;

    //卡种类型
    private String cardTypeLable;

    private String notes;

    /**
     * 购卡	1
     * 退卡	2
     * 使用中	3
     * 已使用	4
     */
    private String state;

    @Excel(name = "状态")
    private String stateLabel;

    private String cardInfoId;

    private String file;

    public UserMembershipCard(String userId, String id, Integer totalNumber, String version, String state, Date nowDate, String cardInfoId) {
        this.userId = userId;
        this.recordId = id;
        this.remainingNumber = totalNumber;
        this.version = version;
        this.cardInfoId = cardInfoId;
        this.state = state;
        this.setCreateTime(nowDate);
        this.setCreateBy(userId);
    }
}
