using NetAdmin.Domain.Enums.Sys;
namespace NetAdmin.Domain.Dto.Sys.Menu;
///
/// 信息:元数据
///
public sealed record MetaInfo : DataAbstraction
{
///
/// Initializes a new instance of the class.
///
public MetaInfo() { }
///
/// Initializes a new instance of the class.
///
public MetaInfo(string color, bool fullPage, bool hidden, bool hiddenBreadCrumb, string icon, string tag
, string title, MenuTypes type)
{
Color = color;
FullPage = fullPage;
Hidden = hidden;
HiddenBreadCrumb = hiddenBreadCrumb;
Icon = icon;
Tag = tag;
Title = title;
Type = type;
}
///
/// 背景颜色
///
[JsonInclude]
public string Color { get; init; }
///
/// 是否整页路由
///
[JsonInclude]
public bool FullPage { get; init; }
///
/// 是否隐藏
///
[JsonInclude]
public bool Hidden { get; init; }
///
/// 是否隐藏面包屑
///
[JsonInclude]
public bool HiddenBreadCrumb { get; init; }
///
/// 图标
///
[JsonInclude]
public string Icon { get; init; }
///
/// 标签
///
[JsonInclude]
public string Tag { get; init; }
///
/// 标题
///
[JsonInclude]
public string Title { get; init; }
///
/// 类型
///
[EnumDataType(typeof(MenuTypes), ErrorMessageResourceType = typeof(Ln)
, ErrorMessageResourceName = nameof(Ln.菜单类型不正确))]
[JsonInclude]
public MenuTypes Type { get; init; }
}