package com.red.circle.wallet.domain.wallet;

import com.red.circle.tool.core.tuple.PennyAmount;
import java.io.Serializable;
import lombok.Data;

/**
 * 钱包单据.
 *
 * @author pengliang on 2021/8/21
 */
@Data
public class WalletReceiptRes implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 资产记录id.
   */
  private Long assetRecordId;

  /**
   * 余额.
   */
  private PennyAmount balance;

  /**
   * 处理金额.
   */
  private PennyAmount opAmount;

  public WalletReceiptRes(Long assetRecordId, PennyAmount balance,
      PennyAmount opAmount) {
    this.assetRecordId = assetRecordId;
    this.balance = balance;
    this.opAmount = opAmount;
  }

  public static WalletReceiptRes of(Long assetRecordId, PennyAmount balance, PennyAmount opAmount) {
    return new WalletReceiptRes(assetRecordId, balance, opAmount);
  }

}
