Пунк Е загрузка вложений готово
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package org.example.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "attachments")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class Attachment {
|
||||
|
||||
@Id
|
||||
private UUID id;
|
||||
|
||||
@Column(name = "chat_id", nullable = false)
|
||||
private UUID chatId;
|
||||
|
||||
@Column(name = "uploader_id", nullable = false)
|
||||
private UUID uploaderId;
|
||||
|
||||
@Column(name = "object_key", nullable = false, length = 512)
|
||||
private String objectKey;
|
||||
|
||||
@Column(name = "original_filename", nullable = false)
|
||||
private String originalFilename;
|
||||
|
||||
@Column(name = "content_type", nullable = false, length = 128)
|
||||
private String contentType;
|
||||
|
||||
@Column(name = "size_bytes", nullable = false)
|
||||
private long sizeBytes;
|
||||
|
||||
@Column(name = "checksum_sha256", nullable = false, length = 64)
|
||||
private String checksumSha256;
|
||||
|
||||
private Integer width;
|
||||
|
||||
private Integer height;
|
||||
|
||||
@CreationTimestamp
|
||||
@Column(name = "created_at", nullable = false, updatable = false)
|
||||
private Instant createdAt;
|
||||
}
|
||||
Reference in New Issue
Block a user