package com.yolo.keyboard.dal.dataobject.tenantbalance;

import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
import lombok.*;

import java.math.BigDecimal;
import java.util.*;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.yolo.keyboard.framework.mybatis.core.dataobject.BaseDO;

/**
 * 租户余额 DO
 *
 * @author 芋道源码
 */
@TableName("system_tenant_balance")
//@KeySequence("system_tenant_balance_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TenantIgnore
public class TenantBalanceDO extends BaseDO {

    /**
     * 租户 Id
     */
    @TableId
    private Long id;
    /**
     * 当前积分余额
     */
    private BigDecimal balance;
    /**
     * 乐观锁版本号
     */
    @Version
    private Integer version;
    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;

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

    private BigDecimal withdrawableBalance;
}