package com.red.circle.wallet.inner.model.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.framework.dto.DTO;
import java.io.Serial;
import java.math.BigDecimal;
import java.sql.Timestamp;
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)
public class FreightBalanceRunningWaterDTO extends DTO {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 主键标识.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  /**
   * 账号
   */
  private String account;

  /**
   * 来源系统.
   */
  private String sysOrigin;

  /**
   * 用户id.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long userId;

  /**
   * 接收用户.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long acceptUserId;

  /**
   * 卖家id.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long sellerId;

  /**
   * 接收人信息
   */
  private AccountItem acceptUserAccount;

  /**
   * 发送人信息
   */
  private AccountItem userAccount;

  /**
   * 类型0.收入 1.支出.
   */
  private Integer type;

  /**
   * 数量.
   */
  private BigDecimal quantity;

  /**
   * usd数量.
   */
  private BigDecimal usdQuantity;

  /**
   * 当前余额.
   */
  private BigDecimal balance;

  /**
   * 金额.
   */
  private BigDecimal amount;

  /**
   * 充值类型.
   */
  private String rechargeType;

  /**
   * 来源.
   */
  private String origin;

  /**
   * 备注.
   */
  private String remark;


  private Timestamp createTime;

  private Timestamp updateTime;

  @JsonSerialize(using = ToStringSerializer.class)
  private Long createUser;
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateUser;

  @Data
  public static class AccountItem {
      private String account;
      private String userNickName;
      private String userAvatar;
  }

}
