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

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.framework.dto.Command;
import com.red.circle.tool.core.tuple.PennyAmount;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serial;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 回收金币单据.
 *
 * @author pengliang on 2023/8/21
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public class SyncGoldReceiptCmd extends Command {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 回收用户id.
   */
  @NotNull(message = "userId required.")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long userId;

  /**
   * 收入金额.
   */
  @NotNull(message = "incomeAmount required.")
  private PennyAmount incomeAmount;

  /**
   * 支出金额.
   */
  @NotNull(message = "expenditureAmount required.")
  private PennyAmount expenditureAmount;

  /**
   * 归属系统.
   */
  @NotBlank(message = "sysOrigin required.")
  private String sysOrigin;

}
