refactor: 系统功能重构
This commit is contained in:
@@ -2,26 +2,31 @@ package com.youlai.system.model.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Schema(description = "部门表单对象")
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class DeptForm {
|
||||
|
||||
@Schema(description="部门ID")
|
||||
@Schema(description="部门ID", example = "1001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description="部门名称")
|
||||
@Schema(description="部门名称", example = "研发部")
|
||||
private String name;
|
||||
|
||||
@Schema(description="父部门ID")
|
||||
@Schema(description="部门编号", example = "RD001")
|
||||
private String code;
|
||||
|
||||
@Schema(description="父部门ID", example = "1000")
|
||||
@NotNull(message = "父部门ID不能为空")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description="状态(1:启用;0:禁用)")
|
||||
@Schema(description="状态(1:启用;0:禁用)", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description="排序(数字越小排名越靠前)")
|
||||
@Schema(description="排序(数字越小排名越靠前)", example = "1")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,30 +3,57 @@ package com.youlai.system.model.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Schema(description = "字典表单对象")
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典表单对象
|
||||
*
|
||||
* @author Ray Hao
|
||||
* @since 2.9.0
|
||||
*/
|
||||
@Schema(description = "字典")
|
||||
@Data
|
||||
public class DictForm {
|
||||
|
||||
@Schema(description="字典ID")
|
||||
@Schema(description = "字典ID",example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description="类型编码")
|
||||
private String typeCode;
|
||||
|
||||
@Schema(description="字典名称")
|
||||
@Schema(description = "字典名称",example = "性别")
|
||||
private String name;
|
||||
|
||||
@Schema(description="字典值")
|
||||
private String value;
|
||||
@Schema(description = "字典编码", example ="gender")
|
||||
private String code;
|
||||
|
||||
@Schema(description="状态(1:启用;0:禁用)")
|
||||
@Schema(description = "字典状态(1-启用,0-禁用)", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description="排序")
|
||||
private Integer sort;
|
||||
@Schema(description = "字典数据项列表",example = "[{\"id\":1,\"name\":\"男\",\"value\":\"1\",\"sort\":1,\"status\":1},{\"id\":2,\"name\":\"女\",\"value\":\"2\",\"sort\":2,\"status\":1}]")
|
||||
private List<DictItem> dictItems;
|
||||
|
||||
@Schema(description = "字典数据项")
|
||||
@Getter
|
||||
@Setter
|
||||
public static class DictItem {
|
||||
|
||||
@Schema(description = "字典ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(1-启用,0-禁用)")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
@Schema(description = "字典备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.youlai.system.model.form;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "字典类型")
|
||||
@Data
|
||||
public class DictTypeForm {
|
||||
|
||||
@Schema(description="字典类型ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description="类型名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description="类型编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description="类型状态(1:启用;0:禁用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -6,8 +6,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 菜单表单对象
|
||||
*
|
||||
* @author Ray
|
||||
* @since 2024/06/23
|
||||
*/
|
||||
@Schema(description = "菜单表单对象")
|
||||
@Data
|
||||
public class MenuForm {
|
||||
@@ -21,11 +26,14 @@ public class MenuForm {
|
||||
@Schema(description = "菜单名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "菜单类型(1-菜单;2-目录;3-外链;4-按钮权限)")
|
||||
@Schema(description = "菜单类型(1-菜单 2-目录 3-外链 4-按钮)")
|
||||
private MenuTypeEnum type;
|
||||
|
||||
@Schema(description = "路由名称")
|
||||
private String routeName;
|
||||
|
||||
@Schema(description = "路由路径")
|
||||
private String path;
|
||||
private String routePath;
|
||||
|
||||
@Schema(description = "组件路径(vue页面完整路径,省略.vue后缀)")
|
||||
private String component;
|
||||
|
||||
Reference in New Issue
Block a user