1. DTO

1-1. AttachmentResponse.java

public record AttachmentResponse(
    Long id,                  // 첨부파일 고유 ID
    String originalFilename,  // 사용자가 업로드한 원본 파일명
    String contentType,       // MIME 타입
    Long sizeBytes,           // 파일 크기(바이트)
    String storagePath        // 서버 저장 경로 또는 접근 가능한 URL
) {}

1-2. DownloadInfo.java

public record DownloadInfo(
    String originalFilename,  // 원본 파일명
    String contentType,       // MIME 타입
    Path filePath             // 실제 서버 경로
) {}

1-3. LoginRequest.java (Auth 관련)

public record LoginRequest(
    @NotBlank @Email String email,
    @NotBlank @Size(min = 8) String password
) {}

2. Entity

2-1. AttachmentEntity.java

@Entity
@Table(name = "attachments")
@Getter @Setter @NoArgsConstructor
public class AttachmentEntity {

    @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;  

    @Column(name = "task_id", nullable = false)
    private Long taskId;  

    @Column(name = "uploader_id", nullable = false)
    private Long uploaderId;  

    @Column(name = "original_filename", nullable = false, length = 255)
    private String originalFilename;  

    @Column(name = "stored_filename", nullable = false, length = 255)
    private String storedFilename;  

    @Column(name = "content_type", length = 100)
    private String contentType;  

    @Column(name = "size_bytes", nullable = false)
    private Long sizeBytes;  

    @Column(name = "storage_path", nullable = false, length = 500)
    private String storagePath;  

    @Column(name = "is_deleted", nullable = false)
    private boolean isDeleted = false;  

    @Column(name = "deleted_at")
    private LocalDateTime deletedAt;  

    @Column(name = "created_at", nullable = false)
    private LocalDateTime createdAt = LocalDateTime.now();  
}