-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathblog.json
93 lines (93 loc) · 1.95 KB
/
blog.json
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
[
{
"name": "post",
"description": "The Blog Posts",
"api": {
"prefix": "api",
"middleware": "auth:api"
},
"model": {
"columns": [
{
"type": "increments",
"name": "id",
"_unique": true
},
{
"type": "integer",
"name": "author_id",
"_index": "post_author_index",
"_rules": "required"
},
{
"type": "string",
"name": "title",
"length": 144
},
{
"type": "text",
"name": "article"
},
{
"type": "integer",
"name": "views",
"_unsigned": true
},
{
"type": "smallInteger",
"name": "status",
"_unsigned": true,
"_index": "post_status_index"
}
],
"_softDeletes": true,
"_timestamps": true,
"_table": "post",
"_belongsTo": ["author", "category"],
"_hasMany": "comment"
}
},
{
"name": "author",
"description": "Post article author",
"api": {
"prefix": "secondApi",
"middleware": "auth:api"
},
"model": {
"columns": [
{
"type": "increments",
"name": "id"
},
{
"type": "string",
"name": "display_name",
"length": 50,
"_rules": "required|string|max:50|min:10"
},
{
"type": "string",
"name": "first_name",
"_rules": "required|string|max:100|min:10"
},
{
"type": "string",
"name": "last_name",
"_rules": "required|string|max:100|min:10"
},
{
"type": "smallInteger",
"name": "status",
"_unsigned": true,
"_index": true,
"_default": 1
}
],
"_softDeletes": true,
"_timestamps": true,
"_table": "author",
"_hasMany": "post"
}
}
]