ЛР5: реализована асинхронная обработка изображений (оценка 3)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package ru.mtusi.messenger.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public record Attachment(
|
||||
@JsonProperty("id") UUID id,
|
||||
@JsonProperty("chat_id") UUID chatId,
|
||||
@JsonProperty("owner_id") UUID ownerId,
|
||||
@JsonProperty("filename") String filename,
|
||||
@JsonProperty("content_type") String contentType,
|
||||
@JsonProperty("size_bytes") long sizeBytes,
|
||||
@JsonProperty("sha256") String sha256,
|
||||
@JsonProperty("status") String status,
|
||||
@JsonProperty("variants") List<Variant> variants, // <-- Изменили тип
|
||||
@JsonProperty("error_code") String errorCode,
|
||||
@JsonProperty("created_at") OffsetDateTime createdAt,
|
||||
@JsonProperty("updated_at") OffsetDateTime updatedAt
|
||||
) {
|
||||
public record Variant(
|
||||
@JsonProperty("name") String name,
|
||||
@JsonProperty("content_type") String contentType,
|
||||
@JsonProperty("size_bytes") long sizeBytes,
|
||||
@JsonProperty("sha256") String sha256,
|
||||
@JsonProperty("width") int width,
|
||||
@JsonProperty("height") int height
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user