Advertisement
Guest User

Untitled

a guest
May 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. Post:
  2. actAs: [ Timestampable, Sortable ]
  3. columns:
  4. title: { type: string(255), notnull: true, unique: true }
  5. excerpt: { type: string(800) }
  6. body: { type: clob, extra: markdown }
  7. image_id: { type: integer }
  8. relations:
  9. Image:
  10. class: DmMedia
  11. local: image_id
  12.  
  13. Comment:
  14. actAs: [ Timestampable ]
  15. columns:
  16. post_id: { type: integer, notnull: true }
  17. author: { type: string(255), notnull: true }
  18. body: { type: clob }
  19. relations:
  20. Post:
  21. foreignAlias: Comments
  22. onDelete: CASCADE
  23.  
  24. Category:
  25. columns:
  26. name: { type: string(255), notnull: true }
  27. body: { type: clob, extra: markdown }
  28.  
  29. Product:
  30. columns:
  31. category_id: { type: integer, notnull: true }
  32. name: { type: string(255), notnull: true }
  33. body: { type: clob, extra: markdown }
  34. relations:
  35. Category:
  36. foreignAlias: Products
  37.  
  38. MyUser2:
  39. columns:
  40. name: string(30)
  41. relations:
  42. # ...
  43. Groups:
  44. class: MyGroup2
  45. local: user_id
  46. foreign: group_id
  47. refClass: UserGroup
  48.  
  49. MyGroup2:
  50. tableName: groups
  51. columns:
  52. name: string(30)
  53. relations:
  54. Users:
  55. class: MyUser2
  56. local: group_id
  57. foreign: user_id
  58. refClass: UserGroup
  59.  
  60. UserGroup:
  61. columns:
  62. user_id:
  63. type: integer
  64. primary: true
  65. group_id:
  66. type: integer
  67. primary: true
  68.  
  69. Entity:
  70. columns:
  71. username: string(20)
  72. password: string(16)
  73. created_at: timestamp
  74. updated_at: timestamp
  75.  
  76. Child1:
  77. inheritance:
  78. extends: Entity
  79. type: column_aggregation
  80. keyField: type
  81. keyValue: 1
  82.  
  83. Child2:
  84. inheritance:
  85. extends: Entity
  86. type: column_aggregation
  87. keyField: type
  88. keyValue: 2
  89.  
  90. Child3:
  91. inheritance:
  92. extends: Entity
  93. type: column_aggregation
  94. keyField: type
  95. keyValue: 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement