You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
// 定义该类所在的包,表明其在项目模块中的位置
|
|
package com.yf.exam.modules.sys.user.dto;
|
|
|
|
// 导入 Swagger 注解,用于在生成 API 文档时描述类的信息
|
|
import io.swagger.annotations.ApiModel;
|
|
// 导入 Swagger 注解,用于在生成 API 文档时描述类属性的信息
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
// 导入 Lombok 的 Data 注解,自动生成 getter、setter、equals、hashCode 和 toString 方法
|
|
import lombok.Data;
|
|
|
|
// 导入 Serializable 接口,使该类的对象可以被序列化和反序列化
|
|
import java.io.Serializable;
|
|
|
|
/**
|
|
* <p>
|
|
* 角色请求类,用于在不同层之间传输角色相关的数据,如在控制器与服务层、服务层与数据访问层之间传递数据。
|
|
* </p>
|
|
*
|
|
* @author 聪明笨狗
|
|
* @since 2020-04-13 16:57
|
|
*/
|
|
// 使用 Lombok 的 Data 注解,自动生成常用方法
|
|
@Data
|
|
// 使用 Swagger 的 ApiModel 注解,为 API 文档描述该类的信息
|
|
@ApiModel(value="角色", description="角色")
|
|
public class SysRoleDTO implements Serializable {
|
|
|
|
// 序列化版本号,确保序列化和反序列化时类的版本一致性
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 角色的唯一标识 ID
|
|
* 在 API 文档中标记为必需项,表明在使用该数据传输对象时,该字段必须提供
|
|
*/
|
|
@ApiModelProperty(value = "角色ID", required=true)
|
|
private String id;
|
|
|
|
/**
|
|
* 角色的名称
|
|
* 在 API 文档中标记为必需项,表明在使用该数据传输对象时,该字段必须提供
|
|
*/
|
|
@ApiModelProperty(value = "角色名称", required=true)
|
|
private String roleName;
|
|
|
|
}
|