using System; using System.Collections.Generic; namespace FrameworkDAL.DTO.Dashboard { // ============================================================ // DashboardDTO — MDASHBOARD header row. Groups multiple MPAGE rows // (via MDASHBOARDPAGE) into an ordered/tabbed set. DashboardType: // 0 Personal (OwnerId required), 1 Shared, 2 Role, 3 System. // ============================================================ public class DashboardDTO { public int DashboardId { get; set; } public string DashboardCode { get; set; } = string.Empty; public string DashboardName { get; set; } = string.Empty; public byte DashboardType { get; set; } public int ModuleId { get; set; } = -1; public string? ModuleCode { get; set; } public string? ModuleName { get; set; } public int OwnerId { get; set; } = -1; public int ImageId { get; set; } = -1; public string? ImageName { get; set; } public string? ImageLinkURL { get; set; } public string? Remarks { get; set; } public int DefaultCriteriaConfigId { get; set; } = -1; public short SortOrder { get; set; } public byte Status { get; set; } public short Version { get; set; } public byte SourceType { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } // ============================================================ // DashboardListWithPagesDTO — the aggregate shape returned by // GetDashboardListForUser: a Dashboard plus its ordered, visible // MDASHBOARDPAGE list. The compatible-or-improved successor to // gbdashboard.component.ts.GetPagesRoleBased()'s flat page-tabs list. // ============================================================ public class DashboardListWithPagesDTO : DashboardDTO { public List Pages { get; set; } = new(); // Per-user personalization (MUSERVSDASHBOARD) layered on top of the role // default — Phase 5. IsPinned dashboards sort first; UserSlNo (if set) // overrides the dashboard's own SortOrder for this user only. public byte IsPinned { get; set; } public short? UserSlNo { get; set; } // Mapped MENTITLEMENTFEATURE.FeatureCode, if this (Standard) dashboard is gated // behind a license feature (MENTITLEMENTFEATUREDASHBOARDMAP) — null if unmapped. // Internal filtering signal only for DashboardBLL; stripped before serializing. [Newtonsoft.Json.JsonIgnore] public string? FeatureCode { get; set; } } }