namespace CMSDAL.DTO.SitePage; // A Page is a TCONTENT row (reusing the existing Content/ContentType/ContentContainer/ // ContentBlock/ContentVersion engine as-is) wrapped by this thin site-scoping/routing row. // SitePageBLL.SavePage is the single owning operation for both tables — see its // ExecuteSaveAsync persistFunc. public class SitePageDTO { public int SitePageId { get; set; } public int SiteId { get; set; } // 0 on a brand-new page (SitePageBLL creates the underlying Content row too); non-zero to // update an existing page, or to attach a new SitePage wrapper to an already-existing // Content row (SharingMode = Linked page reuse across sites). public int ContentId { get; set; } public string UrlPath { get; set; } = string.Empty; public int? ParentSitePageId { get; set; } public bool IsHomePage { get; set; } // 0=Cloned (independent copy), 1=Linked (shared Content, edits propagate everywhere it's used) public byte SharingMode { get; set; } public byte Status { get; set; } public int TenantId { get; set; } // Content-authoring fields — only used when ContentId == 0 (creating the page's Content // row for the first time) or when updating an owned (non-Linked) page's content in the // same call. Ignored when attaching to an existing Content row via SharingMode = Linked. public string ContentTitle { get; set; } = string.Empty; public string ContentSlug { get; set; } = string.Empty; public string? ContentDataJson { get; set; } public string? ContentMetaDataJson { get; set; } public int CreatedById { get; set; } public System.DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public System.DateTime ModifiedOn { get; set; } } // Flat projection returned by GetSiteDocument's page-resolution step. public class SitePageRouteDTO { public int SitePageId { get; set; } public int SiteId { get; set; } public int ContentId { get; set; } public string UrlPath { get; set; } = string.Empty; public bool IsHomePage { get; set; } }