Guest User

Untitled

a guest
Jul 26th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. // Author table
  2.  
  3. Author:
  4. columns:
  5. id:
  6. type: integer(11)
  7. notnull: true
  8. autoincrement: true
  9. primary: true
  10. firstname:
  11. type: string(30)
  12. notnull: false
  13. lastname:
  14. type: string(30)
  15. notnull: false
  16. username:
  17. type: string(20)
  18. notnull: true
  19. password:
  20. type: string(32)
  21. notnull: true
  22. signature:
  23. type: string(255)
  24. notnull: true
  25. relations:
  26. Entries:
  27. class: Entry
  28. refClass: AuthorEntry
  29. local: author_id
  30. foreign: entry_id
  31.  
  32. // Entry table
  33.  
  34. Entry:
  35. actAs: [Timestampable]
  36. columns:
  37. id:
  38. type: integer(11)
  39. notnull: true
  40. autoincrement: true
  41. primary: true
  42. title:
  43. type: string(255)
  44. notnull: true
  45. content:
  46. type: string
  47. notnull: true
  48. is_published:
  49. type: boolean
  50. notnull: true
  51. default: 0
  52. image:
  53. type: string(255)
  54. relations:
  55. Authors:
  56. class: Author
  57. refClass: AuthorEntry
  58. local: entry_id
  59. foreign: author_id
  60.  
  61. // Author/Entry Linking table
  62.  
  63. AuthorEntry:
  64. columns:
  65. author_id:
  66. type: integer
  67. entry_id:
  68. type: integer
  69. relations:
  70. Entry:
  71. local: entry_id
  72. foreign: id
  73. type: one
  74. foreignType: many
  75. Author:
  76. local: author_id
  77. foreign: id
  78. type: one
  79. foreignType: many
Add Comment
Please, Sign In to add comment