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

import com.baomidou.mybatisplus.annotation.*;
import com.red.circle.framework.mybatis.entity.TimestampBaseEntity;
import java.io.Serial;
import java.math.BigDecimal;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 用户工资账户流水表.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_salary_account_running_water")
public class SalaryAccountRunningWater extends TimestampBaseEntity {

  @Serial
  private static final long serialVersionUID = 1L;

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

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

  private Long acceptUserId;

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

  /**
   * 收支类型 0.收入 1.支出.
   */
  @TableField("type")
  private Integer type;

  /**
   * 工资类型.
   */
  @TableField("salary_type")
  private String salaryType;

  /**
   * 变动金额.
   */
  @TableField("amount")
  private BigDecimal amount;

  /**
   * 变动后余额.
   */
  @TableField("balance")
  private BigDecimal balance;

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

  /**
   * 手续费比例（千分比）.
   */
  @TableField("service_charge")
  private Long serviceCharge;

  /**
   * 实际到账金额.
   */
  @TableField("actual_amount")
  private BigDecimal actualAmount;

  /**
   * 临时余额.
   */
  @TableField("temp_balance")
  private BigDecimal tempBalance;

  /**
   * 业务单号.
   */
  @TableField("track_id")
  private String trackId;

  /**
   * 工资事件.
   */
  @TableField("salary_event")
  private String salaryEvent;

  /**
   * 事件描述.
   */
  @TableField("event_desc")
  private String eventDesc;

  /**
   * 备注.
   */
  @TableField("remark")
  private String remark;

  /**
   * 创建用户来源 0.app 1.后台.
   */
  @TableField("create_user_origin")
  private Integer createUserOrigin;

  /**
   * 账单归属（YYYYMM）.
   */
  @TableField("bill_belong")
  private Integer billBelong;

  /**
   * 团队ID.
   */
  @TableField("team_id")
  private Long teamId;

  /**
   * BD ID.
   */
  @TableField("bd_id")
  private Long bdId;

  /**
   * 代理ID.
   */
  @TableField("agent_id")
  private Long agentId;
}
