using FrameworkDAL.DTO.ECMRights; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using System.Threading.Tasks; namespace FrameworkDAL.CustomCode.ECMRights { /// /// Data Access Layer interface for managing ECM Rights records in the database. /// Provides methods to retrieve, insert, update, and delete ECM Rights entries. /// public interface IECMRightsDAL { /// /// Retrieves a single ECM Rights record by its unique identifier. /// /// The unique identifier of the ECM Rights. /// The current user's login details. /// A JSON string representing the ECM Rights details. Task GetECMRights(int ECMRightsId, LoginDTO LoginDTO); /// /// Retrieves a paginated list of ECMRights records based on specified filter criteria. /// Can optionally return the total count of records instead of the list. /// /// The starting index of records to fetch (for pagination). /// The maximum number of records to fetch. /// Filter criteria for selecting ECMRights. /// The current user's login details. /// If true, returns the total count of matching records instead of the list. /// A JSON string representing either the list of ECMRights records or the total count. Task GetSelectListECMRights(int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO LoginDTO, bool isCount = false); /// /// Inserts a new ECM Rights record into the database. /// /// The ECM Rights data to save. /// The current user's login details. /// The number of rows affected (should be 1 if successful). Task SaveECMRights(ECMRightsDTO ECMRightsDTO, LoginDTO LoginDTO); /// /// Updates an existing ECM Rights record in the database. /// /// The updated ECM Rights data. /// The current user's login details. /// The number of rows affected (should be 1 if successful). Task UpdateECMRights(ECMRightsDTO ECMRightsDTO, LoginDTO LoginDTO); /// /// Deletes an ECM Rights record by its unique identifier. /// /// The unique identifier of the ECM Rights to delete. /// The current user's login details. /// A string indicating success or failure of the delete operation. Task DeleteECMRights(int ECMRightsId, LoginDTO LoginDTO); } }