DictDetail.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright 2019-2020 Zheng Jie
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package me.zhengjie.dao.mybatis.entity;
  17. import io.swagger.annotations.ApiModelProperty;
  18. import lombok.Getter;
  19. import lombok.Setter;
  20. import me.zhengjie.base.BaseEntity;
  21. import javax.persistence.*;
  22. import javax.validation.constraints.NotNull;
  23. import java.io.Serializable;
  24. /**
  25. * @author Zheng Jie
  26. * @date 2019-04-10
  27. */
  28. @Entity
  29. @Getter
  30. @Setter
  31. @Table(name="sys_dict_detail")
  32. public class DictDetail extends BaseEntity implements Serializable {
  33. @Id
  34. @Column(name = "detail_id")
  35. @NotNull(groups = Update.class)
  36. @ApiModelProperty(value = "ID", hidden = true)
  37. @GeneratedValue(strategy = GenerationType.IDENTITY)
  38. private Long id;
  39. @JoinColumn(name = "dict_id")
  40. @ManyToOne(fetch=FetchType.LAZY)
  41. @ApiModelProperty(value = "字典", hidden = true)
  42. private Dict dict;
  43. @ApiModelProperty(value = "字典标签")
  44. private String label;
  45. @ApiModelProperty(value = "字典值描述")
  46. @Column(name = "remark")
  47. private String remark;
  48. @ApiModelProperty(value = "字典值")
  49. private String value;
  50. @ApiModelProperty(value = "排序")
  51. private Integer dictSort = 999;
  52. }