using adas_core.Domain.Models.MongoModels;
using MongoDB.Bson;

namespace adas_core.Application.Repositories.Interfaces;

public interface IAuthorityRepository : IMongoRepository<Authorization>
{
    public Task<Authorization> GetById(ObjectId authId);
    void CreateNewAuthority(string roleName, ObjectId userId);
    public Task<List<Authorization>> GetUserAuthorities(ObjectId userId);
    public Task<List<Authorization>> GetAllAuthorities();
    public Task<bool> DeleteAllAuthoritiesByUser(ObjectId userId);
    Task<bool> DeleteAllAuthoritiesByUnit(ObjectId unitId);
    Task<bool> DeleteAllAuthoritiesByDisplay(ObjectId displayId);
    Task<List<Authorization>> GetByUnitId(ObjectId unitId);
}