using System; namespace FrameworkDAL.CustomCode.EntityViewer.DTOs { // ============================================================ // EntityLayoutDTO — header row. TenantId null = global default // layout for the entity; a specific value = per-client override. // ============================================================ public class EntityLayoutDTO { public int EntityLayoutId { get; set; } public string EntityCode { get; set; } = string.Empty; public int? TenantId { get; set; } public string? Title { get; set; } /// True when ENTITYCODE holds a reusable-component code (e.g. "CMP_ADDRESS") /// rather than a real MENTITY.ENTITYCODE — separates the Layout Designer's /// "Entity Templates" tab from its "Reusable Components" tab. public bool IsComponent { get; set; } public int Version { get; set; } public int Status { get; set; } public int SortOrder { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } // ============================================================ // EntityLayoutListItemDTO — GetEntityLayoutList's row shape: the header // plus its current Active version's summary and (for real entity types, // not components) the MENTITY display name — everything the Layout // Designer's list screen needs in one call. // ============================================================ public class EntityLayoutListItemDTO { public int EntityLayoutId { get; set; } public string EntityCode { get; set; } = string.Empty; public int? TenantId { get; set; } public string? Title { get; set; } public bool IsComponent { get; set; } public string? EntityName { get; set; } public int? ActiveVersionNo { get; set; } public string? ActiveVersionLabel { get; set; } public DateTime? ActivatedOn { get; set; } } // ============================================================ // EntityLayoutVersionDTO — SnapshotJson is exactly the FE's // LayoutSchema shape (features/gbentityviewer/models/layout-schema.model.ts). // ============================================================ public class EntityLayoutVersionDTO { public int EntityLayoutVersionId { get; set; } public int EntityLayoutId { get; set; } public int VersionNo { get; set; } public string? VersionLabel { get; set; } public int VersionStatus { get; set; } // 1=Active, 2=Archived public string? SnapshotJson { get; set; } public DateTime? ActivatedOn { get; set; } public int Version { get; set; } public int Status { get; set; } public int SortOrder { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } }