package com.red.circle.wallet.infra.database.rds.entity.salary;

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 com.baomidou.mybatisplus.annotation.Version;
import com.red.circle.framework.mybatis.entity.TimestampBaseEntity;
import java.io.Serial;
import java.math.BigDecimal;
import java.sql.Timestamp;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 用户工资账户余额表.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_salary_account_balance")
public class SalaryAccountBalance {

  /**
   * 主键标识.
   */
  @TableId(value = "id", type = IdType.ASSIGN_ID)
  private Long id;

  /**
   * 用户ID.
   */
  @TableField("user_id")
  private Long userId;

  private String salaryType;

  /**
   * 系统来源.
   */
  @TableField("sys_origin")
  private String sysOrigin;

  /**
   * 累计收入总额.
   */
  @TableField("earn_points")
  private BigDecimal earnPoints;

  /**
   * 累计支出总额.
   */
  @TableField("consumption_points")
  private BigDecimal consumptionPoints;

  /**
   * 当前余额.
   */
  @TableField("balance")
  private BigDecimal balance;

  /**
   * 冻结金额.
   */
  @TableField("frozen_amount")
  private BigDecimal frozenAmount;

  /**
   * 可用余额.
   */
  @TableField("available_balance")
  private BigDecimal availableBalance;

  /**
   * 乐观锁版本号.
   */
  @Version
  @TableField("version")
  private Integer version;


    private Timestamp createTime;

    private Timestamp updateTime;
}
