| New file | 
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | } | 
|---|