| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 | type User {    id: ID! @id    email: String! @unique    name: String!    password: String!    resetToken: String    resetTokenExpiry: Float    createdAt: DateTime! @createdAt    comments: [Comment!]!    ratings: [Rating!]!    permissions: [Permission!]!  @scalarList(strategy: RELATION)    interests: [String!]!  @scalarList(strategy: RELATION)}enum Permission {    ADMIN    INSTRUCTOR}type Training {    id: ID! @id    title: String!    type: TrainingType!    createdAt: DateTime! @createdAt    trainingDate: DateTime!    location: String!    registrations: [User!]!    attendance: Int    ratings: [Rating!]!    published: Boolean!    blocks: [BlockInstance!]! @relation(onDelete: CASCADE)}type TrainingType {    id: ID! @id    name: String! @unique    description: String!}type Block {    id: ID! @id    title: String!    description: String    duration: Int    format: Format!    rest: Int    tracks: [Track!]!    videos: [Video!]!     pictures: [Picture!]!    blocks: [BlockInstance!] @relation(name: "Instances", onDelete: CASCADE)    parentBlockInstances: [BlockInstance!]! @relation(name: "ParentChild", onDelete: CASCADE)    exercises: [ExerciseInstance!]! @relation(name: "BlockExercises", onDelete: CASCADE)}type BlockInstance {    id: ID! @id    block: Block! @relation(name: "ParentChild", onDelete: SET_NULL)    parentBlock: Block @relation(name: "Instances")    parentTraining: Training @relation(link: INLINE)    order: Int!    rounds: Int    variation: String}type Format {    id: ID! @id    name: String!    description: String!}type Picture {    id: ID! @id    createdAt: DateTime! @createdAt    updatedAt: DateTime! @updatedAt    order: Int!    file: File    link: Link}type Video {    id: ID! @id    createdAt: DateTime! @createdAt    updatedAt: DateTime! @updatedAt    order: Int!    file: File    link: Link}type Track {    id: ID! @id    createdAt: DateTime! @createdAt    updatedAt: DateTime! @updatedAt    order: Int!    file: File    link: Link}type File {    id: ID! @id    createdAt: DateTime! @createdAt    updatedAt: DateTime! @updatedAt    user: User!    path: String!    comment: String    mimetype: String    thumbnail: String    filename: String    encoding: String    size: Int    width: Int    height: Int    duration: Float    title: String    artist: String}type Link {    id: ID! @id    createdAt: DateTime! @createdAt    updatedAt: DateTime! @updatedAt    url: String!    user: User!    comment: String    duration: Int    title: String    artist: String}type Exercise {    id: ID! @id    name: String!    description: String    videos: [Video!]!     pictures: [Picture!]!     targets: [String!]! @scalarList(strategy: RELATION)    baseExercise: [String!]! @scalarList(strategy: RELATION)    parentExerciseInstances: [ExerciseInstance!]! }type ExerciseInstance {    id: ID! @id    exercise: Exercise! @relation(link: TABLE)    order: Int!    repetitions: Int    variation: String    parentBlockInstances: Block! @relation(name: "BlockExercises")}type Rating {    id: ID! @id    user: User!    value: Int!    comment: String!    createdAt: DateTime! @createdAt}type Comment {    id: ID! @id    text: String!    author: User!    createdAt: DateTime! @createdAt}
 |