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

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.red.circle.framework.mybatis.entity.TimestampBaseEntity;
import java.io.Serial;
import java.math.BigDecimal;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户货运账户流水.
 * </p>
 *
 * @author pengshigang
 * @since 2021-07-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_freight_balance_running_water")
public class FreightBalanceRunningWater extends TimestampBaseEntity {

  @Serial
  private static final long serialVersionUID = 1L;

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

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

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

  /**
   * 接收用户.
   */
  @TableField("accept_user_id")
  private Long acceptUserId;

  /**
   * 卖家id.
   */
  @TableField("seller_id")
  private Long sellerId;

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

  /**
   * 数量.
   */
  @TableField("quantity")
  private BigDecimal quantity;

  /**
   * usd数量.
   */
  @TableField("usd_quantity")
  private BigDecimal usdQuantity;

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

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

  /**
   * 充值类型.
   */
  @TableField("recharge_type")
  private String rechargeType;

  /**
   * 来源.
   */
  @TableField("origin")
  private String origin;

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

  public FreightBalanceRunningWater withCreateUser(Long createUser) {
    this.setCreateUser(createUser);
    return this;
  }

}
