datamodel.prisma 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. type User {
  2. id: ID! @id
  3. email: String! @unique
  4. name: String!
  5. abbreviation: String!
  6. password: String!
  7. createdAt: DateTime! @createdAt
  8. comments: [Comment]!
  9. ratings: [Rating]!
  10. }
  11. type Training {
  12. id: ID! @id
  13. title: String!
  14. content: [Block]!
  15. createdAt: DateTime! @createdAt
  16. trainingDate: DateTime!
  17. participants: [User]!
  18. ratings: [Rating]!
  19. }
  20. type Block {
  21. id: ID! @id
  22. sequence: Int!
  23. title: String!
  24. duration: Int!
  25. variation: String
  26. format: Format
  27. tracks: [Track]!
  28. excersises: [Excersise]!
  29. }
  30. type Format {
  31. id: ID! @id
  32. name: String!
  33. description: String!
  34. }
  35. type Track {
  36. id: ID! @id
  37. title: String!
  38. artist: String!
  39. duration: Int!
  40. link: String!
  41. }
  42. type Excersise {
  43. id: ID! @id
  44. name: String!
  45. description: String!
  46. video: String!
  47. targets: [String]! @scalarList(strategy: RELATION)
  48. }
  49. type Rating {
  50. id: ID! @id
  51. user: User!
  52. value: Int!
  53. comment: String!
  54. createdAt: DateTime! @createdAt
  55. }
  56. type Comment {
  57. id: ID! @id
  58. text: String!
  59. author: User!
  60. createdAt: DateTime! @createdAt
  61. }