UserVO.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the dreamlu.net developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: Chill 庄骞 (smallchill@163.com)
  16. */
  17. package org.springblade.modules.system.vo;
  18. import com.fasterxml.jackson.annotation.JsonInclude;
  19. import io.swagger.annotations.ApiModel;
  20. import lombok.Data;
  21. import lombok.EqualsAndHashCode;
  22. import org.springblade.core.tool.node.INode;
  23. import org.springblade.modules.system.entity.User;
  24. import java.util.ArrayList;
  25. import java.util.List;
  26. /**
  27. * 视图实体类
  28. *
  29. * @author Chill
  30. * @since 2018-12-24
  31. */
  32. @Data
  33. @EqualsAndHashCode(callSuper = true)
  34. @ApiModel(value = "UserVO对象", description = "UserVO对象")
  35. public class UserVO extends User implements INode {
  36. private static final long serialVersionUID = 1L;
  37. /**
  38. * 主键ID
  39. */
  40. private Integer id;
  41. /**
  42. * 父节点ID
  43. */
  44. private Integer parentId;
  45. /**
  46. * 子孙节点
  47. */
  48. @JsonInclude(JsonInclude.Include.NON_EMPTY)
  49. private List<INode> children;
  50. @Override
  51. public List<INode> getChildren() {
  52. if (this.children == null) {
  53. this.children = new ArrayList<>();
  54. }
  55. return this.children;
  56. }
  57. /**
  58. * 角色名
  59. */
  60. private String roleName;
  61. /**
  62. * 部门名
  63. */
  64. private String deptName;
  65. /**
  66. * 性别
  67. */
  68. private String sexName;
  69. }