Files
number_zj/20220330_Vote/Ewide.Core/Entity/SysMenu.cs
2022-03-30 17:54:33 +08:00

143 lines
3.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
namespace Ewide.Core
{
/// <summary>
/// 菜单表
/// </summary>
[Table("sys_menu")]
[Comment("菜单表")]
public class SysMenu : DEntityBase
{
/// <summary>
/// 父Id
/// </summary>
[Comment("父Id")]
[Column("Pid", TypeName = "varchar(36)")]
public string Pid { get; set; }
/// <summary>
/// 父Ids
/// </summary>
[Comment("父Ids")]
public string Pids { get; set; }
/// <summary>
/// 名称
/// </summary>
[Comment("名称")]
public string Name { get; set; }
/// <summary>
/// 编码
/// </summary>
[Comment("编码")]
public string Code { get; set; }
/// <summary>
/// 菜单类型(字典 0目录 1菜单 2按钮
/// </summary>
[Comment("菜单类型")]
public int Type { get; set; }
/// <summary>
/// 图标
/// </summary>
[Comment("图标")]
public string Icon { get; set; }
/// <summary>
/// 路由地址
/// </summary>
[Comment("路由地址")]
public string Router { get; set; }
/// <summary>
/// 组件地址
/// </summary>
[Comment("组件地址")]
public string Component { get; set; }
/// <summary>
/// 权限标识
/// </summary>
[Comment("权限标识")]
public string Permission { get; set; }
/// <summary>
/// 应用分类(应用编码)
/// </summary>
[Comment("应用分类")]
public string Application { get; set; }
/// <summary>
/// 打开方式(字典 0无 1组件 2内链 3外链
/// </summary>
[Comment("打开方式")]
public int OpenType { get; set; } = 0;
/// <summary>
/// 是否可见Y-是N-否)
/// </summary>
[Comment("是否可见")]
[Column("Visible", TypeName = "bit")]
public bool Visible { get; set; } = true;
/// <summary>
/// 内链地址
/// </summary>
[Comment("内链地址")]
public string Link { get; set; }
/// <summary>
/// 重定向地址
/// </summary>
[Comment("重定向地址")]
public string Redirect { get; set; }
/// <summary>
/// 权重(字典 1系统权重 2业务权重
/// </summary>
[Comment("权重")]
public int Weight { get; set; } = 2;
/// <summary>
/// 排序
/// </summary>
[Comment("排序")]
public int Sort { get; set; } = 100;
/// <summary>
/// 备注
/// </summary>
[Comment("备注")]
public string Remark { get; set; }
/// <summary>
/// 关联上级菜单显示 0表示不需要关联菜单 1表示关联 仅按钮有效
/// </summary>
[Comment("关联菜单显示")]
[Column("VisibleParent", TypeName = "bit")]
public bool VisibleParent { get; set; }
/// <summary>
/// 状态(字典 0正常 1停用 2删除
/// </summary>
public CommonStatus Status { get; set; } = CommonStatus.ENABLE;
/// <summary>
/// 多对多(角色)
/// </summary>
[XmlIgnore]
public ICollection<SysRole> SysRoles { get; set; }
/// <summary>
/// 多对多中间表(用户角色)
/// </summary>
[XmlIgnore]
public List<SysRoleMenu> SysRoleMenus { get; set; }
}
}