Files
masonry/examples/custom-js-functions/blog-example.masonry

32 lines
700 B
Plaintext

entity User {
name: string required
email: string required unique
password: string required
bio: text
createdAt: timestamp
updatedAt: timestamp
}
entity Post {
title: string required
slug: string required unique
content: text required
published: boolean
authorId: uuid required relates to User as one via "authorId"
createdAt: timestamp
updatedAt: timestamp
}
entity Comment {
content: text required
authorId: uuid required relates to User as one via "authorId"
postId: uuid required relates to Post as one via "postId"
createdAt: timestamp
}
server BlogAPI {
host "localhost"
port 3000
database_url env "DATABASE_URL" default "postgres://localhost/blog"
}