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

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.tool.core.tuple.PennyAmount;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 回收金币单据.
 *
 * @author pengliang on 2023/8/21
 */
@Data
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public class RecoveryGoldReceipt implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 请求ID,用户幂等校验.
   */
  private String reqTraceId;

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

  /**
   * 回收金额.
   */
  @NotNull(message = "sysOrigin required.")
  private PennyAmount amount;

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

  /**
   * 回收事件.
   */
  @NotBlank(message = "eventType required.")
  private String eventType;

  /**
   * 事件描述.
   */
  @NotBlank(message = "eventDesc required.")
  private String eventDesc;

  /**
   * 事件id.
   */
  @NotBlank(message = "eventId required.")
  private String eventId;

}
