using System; using System.Collections.Generic; namespace Interfaces { public interface IRepository { /// /// Get a list of Users /// /// /// Returns with full list of users, /// plus a total user count. Pagination options are supported. /// UserList GetUsers(int pageNumber = -1, int pageSize = -1, int groupId = -1); /// /// Search the user list for the following string /// /// string to search the user store for. /// /// Returns with full list of users, /// plus a total user count. Pagination options are supported. /// UserList Search(string searchParam); /// /// Get details about a single user in the system base on their Id /// /// /// integer data type, the Id of the User to get details about. /// /// object with full details, /// including full /// User GetUser(int id); /// /// Get a list of the timelogs available for the specified user /// for the current Calendar Week /// /// /// integer data type, the Id of the user to get time logs for /// /// /// with nested objects /// for the current calendar week /// TimeLogList GetTimeLogs(int userId); /// /// Get a list of the timelogs available for the specified user /// for the specified calendar week /// /// /// integer data type, the Id of the user to get time logs for /// /// /// datetime data type, the date to receive time logs for (will scope out to calendar week). /// /// /// with nested objects /// for the current calendar week /// TimeLogList GetTimeLogs(int userId, DateTime selectedDate); /// /// Get a full list of Identifiers which are not associated to a user. /// /// /// with nested list /// IdentifierList GetUnassignedIdentifierList(); /// /// Remove all unassigned identifiers from the system. /// void ClearUnassignedIdentifiers(); /// /// Update a user in the system with the new values. /// /// /// If the user object passed does not exist, it will be created. /// /// /// object detailing the new properties to assign to the user. /// The Id Field should not be changed, or should be -1 for new users. /// /// /// int - ref param, value will be the UserId of the inserted or updated user /// /// /// to indicate procedure status. /// OperationResponse UpdateUser(User user, out int userId); /// /// Create a new TimeLog Event in the repository. /// /// /// object with the Unique Id triggering the event /// /// The resultant Id of the inserted TimeLog /// Optional - To set the log time of the swipe. /// Particularly useful for buffering logs in nodes if they cannot contact server for whatever reason to minimise data loss /// /// to indicate procedure status. /// LogEventResponse LogEventTime(Identifier identifier, out int logId, DateTime logTime = default(DateTime)); OperationResponse CreateGroup(Group group, out int groupId); List GetGroups(int userId = -1); Group GetGroup(int groupId); OperationResponse UpdateGroup(Group group); OperationResponse DeleteGroup(int groupId); OperationResponse DeleteLog(TimeLog log); OperationResponse CreateLog(TimeLog log); OperationResponse UpdateLog(TimeLog log); } }