package com.hotwj.platform.pay.domain;

import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 会员钱包对象 pay_wallet
 *
 * @author shihongwei
 * @date 2026-05-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("pay_wallet")
public class PayWallet extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 用户编号（企业则为企业id）
     */
    private Long userId;

    /**
     * 余额
     */
    private BigDecimal balance;

    /**
     * 累计支出
     */
    private BigDecimal totalExpense;

    /**
     * 累计充值
     */
    private BigDecimal totalRecharge;

    /**
     * 冻结金额
     */
    private BigDecimal freezePrice;

    /**
     * 1.个人账户 2.企业账户
     */
    private Long walletType;

    /**
     * 冻结状态：0=正常 1=冻结
     */
    private Long freezeStatus;

    /**
     * 0=正常, 1=已删除
     */
    @TableLogic
    private Long isDeleted;


}
