add custom js functions for templates
This commit is contained in:
31
examples/custom-js-functions/blog-example.masonry
Normal file
31
examples/custom-js-functions/blog-example.masonry
Normal file
@ -0,0 +1,31 @@
|
||||
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"
|
||||
}
|
Reference in New Issue
Block a user