namespace FrameworkDAL.DTO.MenuGroup
{
///
/// A single resolved leaf menu under a group, after applying the resolution order:
/// MMENUSETDETAIL override (display name/sort/visibility/group re-filing) if a row
/// exists for this (MenuSetId, MenuId) pair, else MMENUGROUPDETAIL's bundle default
/// plus MMENU's own display name and ISVISIBLE = 1.
///
public class MenuGroupResolvedLeafDTO
{
/// Effective group this leaf renders under — the bundle default
/// (MMENUGROUPDETAIL.MENUGROUPID) unless MMENUSETDETAIL.MENUGROUPID re-files it.
public int MenuGroupId { get; set; }
public int MenuId { get; set; }
public string MenuCode { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public short SortOrder { get; set; }
public byte IsVisible { get; set; } = 1;
/// 0 = inherited from the bundle default (no MMENUSETDETAIL row exists for
/// this (MenuSetId, MenuId) pair); >0 = this leaf has a per-client override, and this
/// is that row's id — the Client Menu Set Editor uses this to visually distinguish
/// inherited vs. overridden leaves and to know which rows to resend on save.
public int MenuSetDetailId { get; set; }
}
}