This commit is contained in:
2026-11-24 19:50:03 +03:00
parent 20afc2c790
commit fd932c6de4
84 changed files with 3738 additions and 15 deletions
@@ -0,0 +1,23 @@
package ru.mtusi.messenger.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.Size;
import java.util.List;
import java.util.UUID;
public record CreateMessage(
@JsonProperty("text")
@Size(max = 4000, message = "text must be up to 4000 characters")
String text,
@JsonProperty("attachment_ids")
@Size(max = 10, message = "attachment_ids can contain up to 10 items")
List<UUID> attachmentIds
) {
public CreateMessage {
if (attachmentIds == null) {
attachmentIds = List.of();
}
}
}