-
Notifications
You must be signed in to change notification settings - Fork 3
/
todoapp.im
74 lines (57 loc) · 1.34 KB
/
todoapp.im
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
settings
app:
# your application name
name: todoapp
# choose one: [django, node]
framework: node
api:
# choose one: [rest, graphql]
format: rest
end settings
# database <database <database name> type: [sqlite, mysql, posgresql]>
database todoapp-db sqlite3
# datamodel spec section
Model Todo {
id integer [primarykey, default auto-increment]
title string [maxlength 255, not-null]
description string [maxlength 1024]
due_date datetime [default now]
done boolean
}
Model Comment {
id integer [primarykey, default auto-increment]
message string [maxlength 512]
submitted datetime [default now]
status string [choice ["read", "unread"] ]
}
Relation todo_comments {
many comments from Comment
one todo from Todo
}
Model Person {
id integer [primarykey, default auto-increment]
email string [maxlength 100]
firstname string [maxlength 100]
lastname string [maxlength 100]
last_login datetime [default now]
}
Relation todo_assignee {
many todos from Todo
one assignee from Person
}
# api spec section
API /todo {
model Todo
actions CRUD
permissions []
filter [done]
}
API /comment {
model Comment
actions CRUD
filter [status]
}
API /create_person {
model Person
actions [Create]
}