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.common.business.core.enums.ReceiptType;
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
import com.red.circle.common.business.enums.DiamondOrigin;
import jakarta.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 积分单据.
 *
 * @author pengliang on 2021/8/21
 */
@Data
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public class DiamondReceiptCmd implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 消费id.
   */
  @NotNull
  @JsonSerialize(using = ToStringSerializer.class)
  private String consumeId;

  /**
   * 追踪id.
   */
  @NotNull
  @JsonSerialize(using = ToStringSerializer.class)
  private Long trackId;

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

  /**
   * 归属平台.
   */
  @NotNull
  private SysOriginPlatformEnum sysOrigin;

  /**
   * 来源用户.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long originUserId;

  /**
   * 来源.
   */
  @NotNull
  private DiamondOrigin origin;

  /**
   * 自定义来源.
   */
  private String customizeOrigin;

  /**
   * 自定义来源描述.
   */
  private String customizeOriginDesc;

  /**
   * 积分数量.
   */
  @NotNull
  private BigDecimal amount;

  /**
   * 创建时间.
   */
  private Timestamp createTime;

  /**
   * 类型.
   */
  private ReceiptType type;

}
