using MediatR;
using StorageService.Domain.AggregatesModel.FileAggregate;

namespace StorageService.API.Application.Commands.MultipartUpload;

/// <summary>
/// EN: Command to initiate a multipart upload.
/// VI: Command để khởi tạo multipart upload.
/// </summary>
public record InitiateMultipartUploadCommand(
    string FileName,
    long FileSizeBytes,
    string ContentType,
    string UserId,
    int? ChunkSizeBytes = null,  // Default: 5MB
    FileAccessLevel AccessLevel = FileAccessLevel.Private,
    string? TenantId = null
) : IRequest<InitiateMultipartUploadResult>;

/// <summary>
/// EN: Result of multipart upload initiation.
/// VI: Kết quả khởi tạo multipart upload.
/// </summary>
public record InitiateMultipartUploadResult(
    bool Success,
    Guid? UploadId,
    string? ProviderUploadId,
    string? ObjectKey,
    string? BucketName,
    int? TotalChunks,
    int? ChunkSizeBytes,
    DateTime? ExpiresAt,
    string? Error
);
