using CMSDAL.DTO.ContentBlock; using GB5Shared.DTO.Framework.Login; namespace CMSDAL.CustomCode.ContentBlock; public interface IContentBlockDAL { Task GetByContainerAsync(int containerId, LoginDTO loginDTO, CancellationToken ct); Task GetFullDocumentAsync(int contentId, LoginDTO loginDTO, CancellationToken ct); Task SaveAsync(ContentBlockDTO dto, LoginDTO loginDTO, CancellationToken ct); Task UpdatePropsAsync(ContentBlockDTO dto, LoginDTO loginDTO, CancellationToken ct); Task ReorderAsync(int contentBlockId, short positionNo, string zoneName, LoginDTO loginDTO, CancellationToken ct); Task DeleteAsync(int contentBlockId, LoginDTO loginDTO, CancellationToken ct); // Used by the cross-tenant guard — returns the container's true owning TenantId (or null if // it doesn't exist), independent of the caller's own claimed tenant. Task GetContainerTenantIdAsync(int contentContainerId, LoginDTO loginDTO, CancellationToken ct); // Used by the cross-tenant guard when attaching a data binding (Phase 12) — returns the // block's true owning TenantId (or null if it doesn't exist). Task GetContentBlockTenantIdAsync(int contentBlockId, LoginDTO loginDTO, CancellationToken ct); // Used by the Phase 14 template materializer — resolves a BlockCode to its BlockId (or null // if no such block type is registered for this tenant/system-wide). Task GetBlockIdByCodeAsync(string blockCode, LoginDTO loginDTO, CancellationToken ct); }