на 3 готово

This commit is contained in:
Dmitry
2026-11-13 22:18:56 +03:00
parent da12a510bc
commit a5284efe7b
16 changed files with 329 additions and 46 deletions
@@ -0,0 +1,35 @@
package org.example.model;
import jakarta.persistence.*;
import lombok.*;
import org.springframework.web.bind.annotation.GetMapping;
import java.io.Serializable;
import java.util.UUID;
@Entity
@Table(name = "message_attachments")
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@IdClass(MessageAttachment.PK.class)
public class MessageAttachment {
@Id
@Column(name = "message_id", nullable = false)
private UUID messageId;
@Column(name = "attachment_id", nullable = false)
private UUID attachmentId;
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class PK implements Serializable {
private UUID messageId;
private UUID attachmentId;
}
}