using MediatR;

namespace StorageService.API.Application.Commands.MultipartUpload;

/// <summary>
/// EN: Command to abort a multipart upload.
/// VI: Command để hủy multipart upload.
/// </summary>
public record AbortMultipartUploadCommand(
    Guid UploadId,
    string UserId
) : IRequest<AbortMultipartUploadResult>;

/// <summary>
/// EN: Result of multipart upload abortion.
/// VI: Kết quả hủy multipart upload.
/// </summary>
public record AbortMultipartUploadResult(
    bool Success,
    string? Error
)
{
    public static AbortMultipartUploadResult Ok() => new(true, null);
    public static AbortMultipartUploadResult Fail(string error) => new(false, error);
}
