ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
 
namespace iWare.Wms.Core
{
    /// <summary>
    /// 菜单表
    /// </summary>
    [Table("sys_menu")]
    [Comment("菜单表")]
    public class SysMenu : DEntityBase
    {
        /// <summary>
        /// 父Id
        /// </summary>
        [Comment("父Id")]
        public long Pid { get; set; }
 
        /// <summary>
        /// 父Ids
        /// </summary>
        [Comment("父Ids")]
        public string Pids { get; set; }
 
        /// <summary>
        /// 名称
        /// </summary>
        [Comment("名称")]
        [Required, MaxLength(20)]
        public string Name { get; set; }
 
        /// <summary>
        /// 编码
        /// </summary>
        [Comment("编码")]
        [Required, MaxLength(50)]
        public string Code { get; set; }
 
        /// <summary>
        /// 菜单类型(字典 0目录 1菜单 2按钮)
        /// </summary>
        [Comment("菜单类型")]
        public MenuType Type { get; set; }
 
        /// <summary>
        /// 图标
        /// </summary>
        [Comment("图标")]
        [MaxLength(20)]
        public string Icon { get; set; }
 
        /// <summary>
        /// 路由地址
        /// </summary>
        [Comment("路由地址")]
        [MaxLength(100)]
        public string Router { get; set; }
 
        /// <summary>
        /// 组件地址
        /// </summary>
        [Comment("组件地址")]
        [MaxLength(100)]
        public string Component { get; set; }
 
        /// <summary>
        /// 权限标识
        /// </summary>
        [Comment("权限标识")]
        [MaxLength(100)]
        public string Permission { get; set; }
 
        /// <summary>
        /// 应用分类(应用编码)
        /// </summary>
        [Comment("应用分类")]
        [MaxLength(50)]
        public string Application { get; set; }
 
        /// <summary>
        /// 打开方式(字典 0无 1组件 2内链 3外链)
        /// </summary>
        [Comment("打开方式")]
        public MenuOpenType OpenType { get; set; } = MenuOpenType.NONE;
 
        /// <summary>
        /// 是否可见(Y-是,N-否)
        /// </summary>
        [Comment("是否可见")]
        [MaxLength(5)]
        public string Visible { get; set; } = "Y";
 
        /// <summary>
        /// 内链地址
        /// </summary>
        [Comment("内链地址")]
        [MaxLength(100)]
        public string Link { get; set; }
 
        /// <summary>
        /// 重定向地址
        /// </summary>
        [Comment("重定向地址")]
        [MaxLength(100)]
        public string Redirect { get; set; }
 
        /// <summary>
        /// 权重(字典 1系统权重 2业务权重)
        /// </summary>
        [Comment("权重")]
        public MenuWeight Weight { get; set; } = MenuWeight.DEFAULT_WEIGHT;
 
        /// <summary>
        /// 排序
        /// </summary>
        [Comment("排序")]
        public int Sort { get; set; } = 100;
 
        /// <summary>
        /// 备注
        /// </summary>
        [Comment("备注")]
        [MaxLength(100)]
        public string Remark { get; set; }
 
        /// <summary>
        /// 状态(字典 0正常 1停用 2删除)
        /// </summary>
        public CommonStatus Status { get; set; } = CommonStatus.ENABLE;
 
        /// <summary>
        /// 多对多(角色)
        /// </summary>
        public ICollection<SysRole> SysRoles { get; set; }
 
        /// <summary>
        /// 多对多中间表(用户角色)
        /// </summary>
        public List<SysRoleMenu> SysRoleMenus { get; set; }
    }
}