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
package com.dy.pipIrrBase.role;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Positive;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
 
/**
 * @author ZhuBaoMin
 * @date 2024-01-10 9:16
 * @LastEditTime 2024-01-10 9:16
 * @Description
 */
 
@Data
@Schema(name = "角色传入对象")
public class DtoRole {
    public static final long serialVersionUID = 1L;
 
    /**
     * 角色编号
     */
    @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Positive(message = "角色编号必须为大于0的整数")
    private Long roleId;
 
    /**
     * 角色名称
     */
    @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "角色名称不能为空")
    @Length(max = 25, message = "角色名称最多25字")
    private String roleName;
 
    /**
     * 权限列表
     */
    @Schema(description = "权限列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private String permissions;
 
    /**
     * 操作人编号
     */
    @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Positive(message = "操作人编号必须为大于0的整数")
    private Long operator;
}