SysMenu.java
2.1 KB
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
package com.youjia.system.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.youjia.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* 菜单 / 权限表(sys_menu)。菜单权限码与按钮权限码同表维护,由 menu_type 区分。
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
@TableName("sys_menu")
@Schema(description = "菜单 / 权限")
public class SysMenu extends BaseEntity {
@TableId(value = "menu_id", type = IdType.AUTO)
@Schema(description = "菜单 ID(自增主键,仅内部关联使用)")
private Long menuId;
/**
* 跨环境唯一编码(固定值,点分命名与权限码层级对齐,如 store.import / system.role.save)。
* 多环境迁移、外部系统引用菜单以本字段对齐,不依赖自增 id;全局唯一(uk_menu_code)。
*/
@Schema(description = "菜单唯一编码(固定值,跨环境迁移以它对齐)")
private String menuCode;
/**
* 父级菜单唯一编码,根为 NULL。父子引用统一走编码,不再有数字 parent_id。
*/
@Schema(description = "父级菜单唯一编码,根为 NULL")
private String parentCode;
@Schema(description = "菜单名称")
private String menuName;
@Schema(description = "类型:1-目录 2-菜单 3-按钮")
private Integer menuType;
@Schema(description = "权限码,命名规则 模块:功能:操作")
private String permCode;
@Schema(description = "所属产品 / 模块分组")
private String product;
@Schema(description = "前端路由")
private String route;
@Schema(description = "图标")
private String icon;
@Schema(description = "显示排序")
private Integer sort;
@Schema(description = "是否可见:1-可见 0-隐藏")
private Integer visible;
@Schema(description = "状态:1-启用 0-停用")
private Integer status;
}