type Book @model {
    ISBN: ID!
    title: String!
    author: Author!@relation(mappingType: "join_index_foreign", name: "written")
    description: Text
    published: DateTime!
    genre:Genre
}
type Author @model{
    id : ID!
    name: String!
    born: DateTime!
    age: Int
    died: DateTime
    nationality: String!
    books: [Book] @relation(mappingType: "join_index_foreign", name: "written")
}

# auto generated queries
type Query {
    book : [Book]
    author : [Author]
}

enum Genre {
    AdventureStories
    Classics
    Crime
    FairyTales
    Fantasy
    HistoricalFiction
    Horror
    Humour
}