-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvoyager.surql
56 lines (40 loc) · 2.34 KB
/
voyager.surql
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
-- ------------------------------
-- Export generated by Surrealist on 2024-06-16T15:58:20.923Z
-- ------------------------------
OPTION IMPORT;
-- ------------------------------
-- TABLE: Category
-- ------------------------------
DEFINE TABLE Category TYPE NORMAL SCHEMAFULL PERMISSIONS NONE;
DEFINE FIELD category_id ON Category TYPE number PERMISSIONS FOR select, create, update, delete WHERE FULL;
-- ------------------------------
-- TABLE: Post
-- ------------------------------
DEFINE TABLE Post TYPE NORMAL SCHEMAFULL PERMISSIONS NONE;
DEFINE FIELD author ON Post TYPE string PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD content_bbcode ON Post TYPE string PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD content_html ON Post TYPE string PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD date ON Post TYPE datetime PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD idx ON Post TYPE number PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD post_id ON Post TYPE number PERMISSIONS FOR select, create, update, delete WHERE FULL;
-- ------------------------------
-- TABLE: Topic
-- ------------------------------
DEFINE TABLE Topic TYPE NORMAL SCHEMAFULL PERMISSIONS NONE;
DEFINE FIELD author ON Topic TYPE string PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD closed ON Topic TYPE bool PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD sticky ON Topic TYPE bool PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD title ON Topic TYPE string PERMISSIONS FOR select, create, update, delete WHERE FULL;
DEFINE FIELD topic_id ON Topic TYPE number PERMISSIONS FOR select, create, update, delete WHERE FULL;
-- ------------------------------
-- TABLE: posts
-- ------------------------------
DEFINE TABLE posts TYPE RELATION IN Topic OUT Post SCHEMAFULL PERMISSIONS NONE;
DEFINE FIELD in ON posts TYPE record<Topic> PERMISSIONS FULL;
DEFINE FIELD out ON posts TYPE record<Post> PERMISSIONS FULL;
-- ------------------------------
-- TABLE: topics
-- ------------------------------
DEFINE TABLE topics TYPE RELATION IN Category OUT Topic SCHEMAFULL PERMISSIONS NONE;
DEFINE FIELD in ON topics TYPE record<Category> PERMISSIONS FULL;
DEFINE FIELD out ON topics TYPE record<Topic> PERMISSIONS FULL;