using ECPDAL.Correspondence.DTOs; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using GB5Shared.QueryExecutor; namespace ECPDAL.Correspondence.Interfaces; public interface ICorrespondenceDAL { Task GetCorrespondenceAsync(int correspondenceId, LoginDTO login, CancellationToken ct); Task> GetCorrespondenceHistoryAsync(int objectTypeId, int objectId, LoginDTO login, CancellationToken ct); /// Tenant-wide, paged, CriteriaDTO-filterable list -- see /// CorrespondenceDAL.ApplyCorrespondenceListCriteria/GetCorrespondenceColumnForField for the /// supported FieldName set (Direction, Mode, ActionStatus, CorrespondenceTypeId, /// ObjectTypeId, ObjectId, CreatedOn, SentOn). Task> GetCorrespondenceListAsync( CriteriaDTO? criteriaDTO, int pageNumber, int pageSize, LoginDTO login, CancellationToken ct); Task SaveCorrespondenceAsync(CorrespondenceDTO dto, LoginDTO login, CancellationToken ct); Task UpdateActionStatusAsync(int correspondenceId, byte actionStatus, DateTime? sentOn, int modifiedById, LoginDTO login, CancellationToken ct); /// Updates editable routing/scheduling fields. Returns false if no row matched /// (not found, wrong tenant, or stale Version — caller should surface a conflict/not-found). Task UpdateCorrespondenceAsync(UpdateCorrespondenceDTO dto, int modifiedById, LoginDTO login, CancellationToken ct); /// Soft-deletes (STATUS=2). Returns false if no active row matched. Task DeleteCorrespondenceAsync(int correspondenceId, int modifiedById, LoginDTO login, CancellationToken ct); }