package com.red.circle.other.infra.database.mongo.dto;

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

/**
 * @author pengliang on 2022/8/24
 */
@Data
@Accessors(chain = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
public class TemporaryActivityCountParam implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 归属平台.
   */
  String sysOrigin;

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

  /**
   * 活动类型.
   */
  String activityType;

  /**
   * 统计类型.
   */
  String countType;

  /**
   * 数量.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long quantity;

  public String objectId() {
    return userId + "_" + activityType + "_" + countType;
  }

}
