jdl.jh 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. entity AccountDetails{
  2. securityQuestion String,
  3. securityAnswer String,
  4. phoneNumber String
  5. }
  6. entity Profile{
  7. bio String,
  8. accessible Boolean
  9. }
  10. entity Friend{
  11. topFriend Boolean
  12. }
  13. entity Album{
  14. name String,
  15. description String,
  16. }
  17. entity Photo {
  18. imageURL String,
  19. size Long
  20. }
  21. entity Video {
  22. videoURL String,
  23. size Long,
  24. }
  25. entity Post {
  26. numberOfComments Long,
  27. content String,
  28. likes Long,
  29. dislikes Long
  30. }
  31. entity Comment {
  32. content String,
  33. likes Long,
  34. dislikes Long
  35. }
  36. relationship ManyToOne {
  37. Comment{commenter(email)} to User
  38. }
  39. relationship ManyToOne {
  40. Comment{post} to Post
  41. }
  42. relationship ManyToOne {
  43. Post{owner(email)} to User
  44. }
  45. relationship ManyToOne {
  46. Photo{post} to Post
  47. }
  48. relationship ManyToOne {
  49. Video{post} to Post
  50. }
  51. relationship ManyToOne {
  52. Album{owner(email)} to User
  53. }
  54. relationship ManyToMany {
  55. Photo{album(name)} to Album
  56. }
  57. relationship OneToOne {
  58. AccountDetails{userAccount(email)} to User
  59. }
  60. relationship OneToOne {
  61. Profile{userProfile(email)} to User
  62. }
  63. relationship ManyToOne{
  64. Friend{user(email)} to User
  65. }
  66. relationship ManyToOne{
  67. Friend{friend(email)} to User
  68. }