namespace CMSDAL.DTO.BlockDataBinding; // BindingMode values — kept as a plain byte (not a C# enum), matching every other CMS // status-style field in this module (ContentStatus, NavigationLinkType, DataSourceAuthMode). public static class BlockDataBindingMode { // GB5 fetches the DataSource, applies its ResponseMappingJson, and merges the result into // the block's PropsJson before GetSiteDocument returns — the renderer never knows the block // is dynamic. public const byte ServerSideRenderMerge = 0; // The FE/renderer calls back to GB5's own GetBlockData proxy endpoint at runtime using the // opaque {DataSourceCode, ParamsJson} contract merged into PropsJson under a reserved key — // the third-party endpoint and its Vault secret are still never exposed to the browser. public const byte ClientSideFetch = 1; } public class BlockDataBindingDTO { public int BlockDataBindingId { get; set; } public int ContentBlockId { get; set; } public int DataSourceId { get; set; } public byte BindingMode { get; set; } // Fills {placeholder} tokens in the DataSource's EndpointTemplate, e.g. {"region":"us-east"}. public string? ParamsJson { get; set; } public byte Status { get; set; } public int TenantId { get; set; } public int CreatedById { get; set; } public System.DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public System.DateTime ModifiedOn { get; set; } }