TbSysDept.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package cc.iotkit.data.model;
  2. import cc.iotkit.common.constant.UserConstants;
  3. import cc.iotkit.common.tenant.dao.TenantAware;
  4. import cc.iotkit.common.tenant.listener.TenantListener;
  5. import cc.iotkit.model.system.SysDept;
  6. import io.github.linpeilie.annotations.AutoMapper;
  7. import io.swagger.annotations.ApiModel;
  8. import io.swagger.annotations.ApiModelProperty;
  9. import lombok.Data;
  10. import lombok.EqualsAndHashCode;
  11. import org.hibernate.annotations.Filter;
  12. import org.hibernate.annotations.FilterDef;
  13. import org.hibernate.annotations.GenericGenerator;
  14. import org.hibernate.annotations.ParamDef;
  15. import javax.persistence.*;
  16. /**
  17. * 部门表 sys_dept
  18. *
  19. * @author Lion Li
  20. */
  21. @Data
  22. @EqualsAndHashCode(callSuper = true)
  23. @Entity
  24. @Table(name = "sys_dept")
  25. @AutoMapper(target = SysDept.class)
  26. @ApiModel(value = "部门表")
  27. @FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")})
  28. @Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
  29. @EntityListeners(TenantListener.class)
  30. public class TbSysDept extends BaseEntity implements TenantAware {
  31. private static final long serialVersionUID = 1L;
  32. /**
  33. * 部门ID
  34. */
  35. @Id
  36. @GeneratedValue(generator = "SnowflakeIdGenerator")
  37. @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
  38. @ApiModelProperty(value = "部门ID")
  39. private Long id;
  40. /**
  41. * 租户编号
  42. */
  43. @ApiModelProperty(value = "租户ID")
  44. private String tenantId;
  45. /**
  46. * 父部门ID
  47. */
  48. @ApiModelProperty(value = "父部门ID")
  49. private Long parentId;
  50. /**
  51. * 部门名称
  52. */
  53. @ApiModelProperty(value = "部门名称")
  54. private String deptName;
  55. /**
  56. * 显示顺序
  57. */
  58. @ApiModelProperty(value = "显示顺序")
  59. private Integer orderNum;
  60. /**
  61. * 负责人
  62. */
  63. @ApiModelProperty(value = "负责人")
  64. private String leader;
  65. /**
  66. * 联系电话
  67. */
  68. @ApiModelProperty(value = "联系电话")
  69. private String phone;
  70. /**
  71. * 邮箱
  72. */
  73. @ApiModelProperty(value = "邮箱")
  74. private String email;
  75. /**
  76. * 部门状态:0正常,1停用
  77. */
  78. @ApiModelProperty(value = "部门状态:0正常,1停用")
  79. private String status;
  80. /**
  81. * 删除标志(0代表存在 2代表删除)
  82. */
  83. @ApiModelProperty(value = "删除标志(0代表存在 2代表删除)")
  84. private String delFlag= UserConstants.NORMAL;
  85. /**
  86. * 祖级列表
  87. */
  88. @ApiModelProperty(value = "祖级列表")
  89. private String ancestors;
  90. /**
  91. * 部门名称
  92. */
  93. @ApiModelProperty(value = "部门编码")
  94. private String deptCode;
  95. }