package cn.iocoder.yudao.module.custom.entity;

import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.math.BigDecimal;

/**
 * 用户积分（余额） DO
 *
 * @author pqz
 */
@TableName("base_customer_balance")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CustomerBalance extends TenantBaseDO {

    /**
     * 主键标识
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;
    /**
     * 客户id
     */
    private String cusId;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 积分余额
     */
    private BigDecimal balance;
    /**
     * 冻结积分
     */
    private BigDecimal forzeBalance;
    /**
     * 累计充值额度
     */
    private BigDecimal allBalance;
    @TableField(exist = false)
    private BigDecimal nowChange;

}