using System.Collections.Generic; using System.Data.Common; using System.Threading; using System.Threading.Tasks; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.GOP; namespace FrameworkDAL.CustomCode.GOP { public interface ICanonicalModelDAL { Task> GetList(LoginDTO loginDTO, CancellationToken ct = default); Task GetById(int canonicalModelId, LoginDTO loginDTO, CancellationToken ct = default); Task GetByEntityCode(string entityCode, LoginDTO loginDTO, CancellationToken ct = default); Task Insert(GopCanonicalModelDTO dto, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct = default); Task Update(GopCanonicalModelDTO dto, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct = default); Task Deactivate(int canonicalModelId, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct = default); Task> GetFieldsByModel(int canonicalModelId, LoginDTO loginDTO, CancellationToken ct = default); Task InsertField(GopCanonicalFieldDTO dto, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct = default); Task DeleteField(int canonicalFieldId, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct = default); // Needed so DeleteCanonicalField's BLL caller can invalidate the parent model's // GetCanonicalFieldsByModel cache entry (the delete itself only knows the field's own id). Task GetFieldModelId(int canonicalFieldId, LoginDTO loginDTO, CancellationToken ct = default); Task DeleteFieldsByModel(int canonicalModelId, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct = default); } }