using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Knot.Contracts.Cleanup.Abstractions;

public interface ICleanupService
{
    Task<CleanupData> GetCleanupDataAsync(CancellationToken cancellationToken);
    Task CleanOrphanMessagesAsync(List<Guid> messageIds, CancellationToken cancellationToken);
    Task CleanOrphanFilesAsync(List<string> fileIds, CancellationToken cancellationToken);
}

public record CleanupData(
    List<ChatCleanupInfo> Chats,
    List<MessageCleanupInfo> Messages,
    List<StoryCleanupInfo> Stories,
    List<UserCleanupInfo> Users,
    List<FileCleanupInfo> Files);

public record ChatCleanupInfo(Guid Id, string? Avatar);

public record MessageCleanupInfo(Guid Id, Guid ChatId, bool IsDeleted, string? MediaUrl);

public record StoryCleanupInfo(Guid Id, string? MediaUrl);

public record UserCleanupInfo(Guid Id, string? Avatar);

public record FileCleanupInfo(string FileId);
