XuqmGroup-Server/xuqm-bugcollect-service/src/main/java/com/xuqm/bugcollect/dto/EventBatchRequest.java

27 行
985 B
Java

package com.xuqm.bugcollect.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import java.util.List;
public record EventBatchRequest(
@JsonProperty("sentAt") String sentAt,
@JsonProperty("sdk") IssueBatchRequest.SdkInfo sdk,
@JsonProperty("events") @NotEmpty List<EventItem> events
) {
public record EventItem(
@JsonProperty("eventId") String eventId,
@NotBlank @JsonProperty("appKey") String appKey,
@NotBlank String name,
long timestamp,
@JsonProperty("properties") Object properties,
String platform,
String release,
String environment,
@JsonProperty("user") IssueBatchRequest.UserInfo user,
@JsonProperty("device") IssueBatchRequest.DeviceInfo device,
@JsonProperty("sdk") IssueBatchRequest.SdkInfo sdk
) {}
}