using e_suite.Database.Audit;
using e_suite.Database.Core;
using e_suite.Database.Core.Tables.Activity;
using eSuite.Core.Miscellaneous;

namespace e_suite.API.Common.repository;

public interface IActivityRepository : IRepository
{
    Task CreateActivityInstanceAsync(
        AuditUserDetails auditUserDetails,
        Activity template,
        CancellationToken cancellationToken
    );

    Task<Activity?> GetActivityInstanceAsync(GeneralIdRef activityId, CancellationToken cancellationToken);

    Task UpdateActivityInstanceAsync(
        AuditUserDetails auditUserDetails,
        Activity activityInstance,
        CancellationToken cancellationToken
    );

    Task AddActivityTasksAsync(AuditUserDetails auditUserDetails, IEnumerable<ActivityTask> activityTasks, CancellationToken cancellationToken);
    Task UpdateActivityTasksAsync(AuditUserDetails auditUserDetails, ICollection<ActivityTask> tasks, CancellationToken cancellationToken);
    IQueryable<ActivityAssignment> GetAssignments();
}