ResourceModel.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package jnpf.base.model.resource;
  2. import io.swagger.v3.oas.annotations.media.Schema;
  3. import lombok.Data;
  4. import java.io.Serializable;
  5. import java.util.Date;
  6. /**
  7. * 资源
  8. */
  9. @Data
  10. public class ResourceModel implements Serializable {
  11. private String id;
  12. private String fullName;
  13. private String enCode;
  14. private String conditionJson;
  15. private String conditionText;
  16. private Integer allData;
  17. private String moduleId;
  18. private String matchLogic;
  19. private String objectId;
  20. private String icon;
  21. private String parentId;
  22. private String systemId;
  23. private Long sortCode=999999L;
  24. private Long creatorTime;
  25. private Date creatorTimes;
  26. public Long getCreatorTime() {
  27. if (this.creatorTimes != null && this.creatorTime == null) {
  28. return this.getCreatorTimes().getTime();
  29. } else if (this.creatorTime != null){
  30. return this.creatorTime;
  31. }
  32. return 0L;
  33. }
  34. public void setCreatorTimes(Date creatorTimes) {
  35. this.creatorTimes = creatorTimes;
  36. if(creatorTimes != null && this.creatorTime == null){
  37. this.creatorTime = creatorTimes.getTime();
  38. }
  39. }
  40. public void setCreatorTime(Long creatorTime) {
  41. this.creatorTime = creatorTime;
  42. if(creatorTime != null && this.creatorTimes == null){
  43. this.creatorTimes = new Date(creatorTime);
  44. }
  45. }
  46. }