package ai.decompile.workspace.model.dto;

import ai.decompile.workspace.model.entity.BinaryDependency;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.Instant;
import java.util.UUID;

public record BinaryDependencyResponse(
    @NotNull UUID id, @NotBlank String filename, long fileSize, @NotNull Instant createdAt) {
  public static BinaryDependencyResponse from(BinaryDependency dep) {
    return new BinaryDependencyResponse(
        dep.getId(), dep.getFilename(), dep.getFileSize(), dep.getCreatedAt());
  }
}
