提交 | 用户 | 时间
|
feab3f
|
1 |
package com.iailab.module.system.api.app.dto; |
H |
2 |
|
|
3 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
4 |
import lombok.Data; |
|
5 |
|
|
6 |
import javax.validation.constraints.NotBlank; |
|
7 |
import javax.validation.constraints.NotNull; |
|
8 |
import javax.validation.constraints.Size; |
|
9 |
import java.time.LocalDateTime; |
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
@Schema(description = "RPC 服务 - 应用菜单 Response DTO") |
|
13 |
@Data |
|
14 |
public class AppMenuRespDTO { |
|
15 |
|
|
16 |
@Schema(description = "菜单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|
17 |
private Long id; |
|
18 |
|
|
19 |
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "平台") |
|
20 |
@NotBlank(message = "菜单名称不能为空") |
|
21 |
@Size(max = 50, message = "菜单名称长度不能超过50个字符") |
|
22 |
private String name; |
|
23 |
|
|
24 |
@Schema(description = "权限标识,仅菜单类型为按钮时,才需要传递", example = "sys:menu:add") |
|
25 |
@Size(max = 100) |
|
26 |
private String permission; |
|
27 |
|
|
28 |
@Schema(description = "类型,参见 MenuTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
29 |
@NotNull(message = "菜单类型不能为空") |
|
30 |
private Integer type; |
|
31 |
|
|
32 |
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|
33 |
@NotNull(message = "显示顺序不能为空") |
|
34 |
private Integer sort; |
|
35 |
|
|
36 |
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|
37 |
@NotNull(message = "父菜单 ID 不能为空") |
|
38 |
private Long parentId; |
|
39 |
|
|
40 |
@Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post") |
|
41 |
@Size(max = 200, message = "路由地址不能超过200个字符") |
|
42 |
private String path; |
|
43 |
|
|
44 |
@Schema(description = "菜单图标,仅菜单类型为菜单或者目录时,才需要传", example = "/menu/list") |
|
45 |
private String icon; |
|
46 |
|
|
47 |
@Schema(description = "组件路径,仅菜单类型为菜单时,才需要传", example = "system/post/index") |
|
48 |
@Size(max = 200, message = "组件路径不能超过255个字符") |
|
49 |
private String component; |
|
50 |
|
|
51 |
@Schema(description = "组件名", example = "SystemUser") |
|
52 |
private String componentName; |
|
53 |
|
|
54 |
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
55 |
@NotNull(message = "状态不能为空") |
|
56 |
private Integer status; |
|
57 |
|
|
58 |
@Schema(description = "是否可见", example = "false") |
|
59 |
private Boolean visible; |
|
60 |
|
|
61 |
@Schema(description = "是否缓存", example = "false") |
|
62 |
private Boolean keepAlive; |
|
63 |
|
|
64 |
@Schema(description = "是否总是显示", example = "false") |
|
65 |
private Boolean alwaysShow; |
|
66 |
|
|
67 |
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式") |
|
68 |
private LocalDateTime createTime; |
|
69 |
|
|
70 |
/** |
|
71 |
* 应用类型(1-系统菜单, 2-应用菜单) |
|
72 |
*/ |
|
73 |
private Integer appType; |
|
74 |
|
|
75 |
/** |
|
76 |
* 子路由 |
|
77 |
*/ |
|
78 |
private List<AppMenuRespDTO> children; |
|
79 |
|
|
80 |
} |