using OrderCriterias;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ManagerInterfaces
{
///
/// All methods to handle administrators
/// /!\ all methods returns a task
///
/// a DTO, Entity or Model administrator
public interface IAdministratorManager
{
///
/// get the number of T element
///
/// the number of T element
public int getNbElements();
///
/// add a T element
///
/// the administrator to add
///
/// the T element that corresponde to
/// the administrator added or the administrator equal to this
/// administrator if this administrator was already added
///
public Task addAdmin(T admin);
///
/// remove a T element
///
/// the administrator to remove
/// the administrator removed or null if there isn't any
public Task removeAdmin(T admin);
///
/// remove a T element
///
/// the id of the administrator to remove
/// the administrator removed or null if there isn't any
public Task removeAdmin(int id);
///
/// get a part of all administrators
///
/// the actual page
/// number of T element in a page
/// the order criteria
///
/// a set of the number of page and
/// all T element in the database for
/// the page nb (or null if the page
/// does not exist (<=> (nb-1)*count outside
/// boundaries (0, getNbElement()-1)))
///
public Task<(int nbPages, IEnumerable? administrators)> getAdministrators(int nb, int count, AdministratorOrderCriteria orderCriteria = AdministratorOrderCriteria.ById);
///
/// get an administrator by his username
///
/// the username of the administrator
/// the administrator that corresponde or null if there isn't any
public Task getAdministratorByUsername(string username);
///
/// set the password of an administrator
///
/// the username of the administrator
/// the hash of the new password
///
/// true if the password was sucessful change
/// false otherwise (no administrator with this username
///
public Task setPassword(string username, string newHashedPassword);
}
}