Guest User

Untitled

a guest
Jun 23rd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. class Forum {
  2. String title
  3. String details
  4. String active
  5. User user
  6. Date createdDate
  7. Date modifiedDate
  8. static hasMany = [ categories: ForumCategory ]
  9. static constraints = {
  10. }
  11. }
  12. class ForumCategory extends Forum {
  13. Attachment attachment
  14. static hasMany = [ topics : Topic ]
  15. static belongsTo = Forum
  16. static constraints = {
  17. }
  18. }
  19. class Topic extends ForumCategory {
  20. static hasMany = [threads: Thread]
  21. def belongsTo = ForumCategory
  22. static constraints = {
  23. }
  24. }
  25. class Thread extends Topic {
  26. static hasMany = [replies:Reply]
  27. def belongsTo = Topic
  28. static constraints = {
  29. }
  30. }
  31. class Reply extends Thread {
  32. def belongsTo = Thread
  33. static constraints = {
  34. }
  35. }
  36.  
  37. --------
  38.  
  39. class User {
  40. String username
  41. String firstName
  42. String lastName
  43. Date createdDate
  44. Date modifiedDate
  45. String active
  46. String emailAddress
  47. static hasMany = [ phoneNumbers: PhoneNumber ]
  48. String password
  49. String company
  50. String nickName
  51. String databaseEventUpdates
  52. String middlewareEventUpdates
  53. String applicationEventUpdates
  54. String partnerEventUpdates
  55. Avatar avatar
  56.  
  57. static constraints = {
  58. }
  59. }
  60. class PhoneNumber {
  61. String type
  62. String phNumber
  63. static constraints = {
  64. }
  65. }
  66. class Avatar {
  67. String thumbURI
  68. String fullURI
  69.  
  70. static constraints = {
  71. }
  72. }
  73. class Attachment {
  74. String filename
  75. String mimetype
  76. Date createdDate
  77. Date modifiedDate
  78. String active
  79.  
  80. static constraints = {
  81. }
  82. }
Add Comment
Please, Sign In to add comment