using System;
using System.Threading;
using System.Threading.Tasks;
using Knot.Contracts.Relations.Domain;
using Knot.Modules.Stories.Domain;
using Microsoft.EntityFrameworkCore;

namespace Knot.Modules.Stories.Application.Abstractions;

public interface IStoriesDbContext
{
    DbSet<Story> Stories { get; }
    DbSet<Friendship> Friendships { get; }
    DbSet<StoryViewer> StoryViewers { get; }
    DbSet<TEntity> Set<TEntity>() where TEntity : class;
    Task<int> SaveChangesAsync(CancellationToken cancellationToken);
}

public interface IStoriesUnitOfWork
{
    Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
