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

namespace StorageService.API.Application.Commands;

/// <summary>
/// EN: Command to upload a file.
/// VI: Command để upload file.
/// </summary>
public record UploadFileCommand(
    Stream FileStream,
    string FileName,
    string ContentType,
    long FileSizeBytes,
    string UserId,
    string? TenantId = null,
    FileAccessLevel AccessLevel = FileAccessLevel.Private
) : IRequest<UploadFileResult>;

/// <summary>
/// EN: Result of file upload.
/// VI: Kết quả upload file.
/// </summary>
public record UploadFileResult(
    bool Success,
    Guid? FileId,
    string? ObjectKey,
    string? Error);
