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

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serial;
import java.io.Serializable;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 钱包余额.
 *
 * @author pengliang on 2023/6/30
 */
@Deprecated
@Data
@Accessors(chain = true)
public class WalletBalance implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 余额.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long balance;


  public static WalletBalance of(Long balance) {
    WalletBalance walletBalance = new WalletBalance();
    walletBalance.setBalance(balance);
    return walletBalance;
  }

}
