Skip to content

Commit c09ee30

Browse files
change dbcfg.json structure to include more details
1 parent a55dd0e commit c09ee30

File tree

3 files changed

+79
-62
lines changed

3 files changed

+79
-62
lines changed

dbs/iam/dbcfg.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
[
2-
{
3-
"name": "users",
4-
"columns": [
5-
{ "id": "userId", "name": "User ID", "type": "NUMBER", "primary": true },
6-
{ "id": "name", "name": "Name", "type": "STRING" }
7-
]
8-
}
9-
]
1+
{
2+
"name": "iam",
3+
"description": "iam database",
4+
"tables": [
5+
{
6+
"name": "users",
7+
"columns": [
8+
{
9+
"id": "userId",
10+
"name": "User ID",
11+
"type": "NUMBER",
12+
"primary": true
13+
},
14+
{ "id": "name", "name": "Name", "type": "STRING" }
15+
]
16+
}
17+
]
18+
}

dbs/map/dbcfg.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
[
2-
{
3-
"name": "points",
4-
"columns": [
5-
{ "id": "id", "name": "ID", "type": "NUMBER", "primary": true },
6-
{ "id": "lat", "name": "Latitude", "type": "NUMBER" },
7-
{ "id": "lng", "name": "Longitude", "type": "NUMBER" }
8-
]
9-
}
10-
]
1+
{
2+
"name": "map",
3+
"description": "map database",
4+
"tables": [
5+
{
6+
"name": "points",
7+
"columns": [
8+
{ "id": "id", "name": "ID", "type": "NUMBER", "primary": true },
9+
{ "id": "lat", "name": "Latitude", "type": "NUMBER" },
10+
{ "id": "lng", "name": "Longitude", "type": "NUMBER" }
11+
]
12+
}
13+
]
14+
}

dbs/pet/dbcfg.json

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
1-
[
2-
{
3-
"name": "dogs",
4-
"columns": [
5-
{
6-
"id": "name",
7-
"name": "Name",
8-
"type": "STRING",
9-
"primary": true,
10-
"ui:createUpdatePage:placeholder": "Please fill name"
11-
},
12-
{ "id": "age", "name": "Age", "type": "NUMBER" },
13-
{
14-
"id": "color",
15-
"name": "Color",
16-
"type": "STRING",
17-
"ui:createUpdatePage:enum": ["white", "black"],
18-
"type:createUpdatePage": "RadioGroup"
19-
},
20-
{
21-
"id": "tags",
22-
"name": "Tags",
23-
"type": "STRING_ARRAY",
24-
"ui:presets": ["spike", "cookie"]
25-
},
26-
{
27-
"id": "photos",
28-
"name": "Photos",
29-
"type": "STRING_ARRAY",
30-
"type:createUpdatePage": ["MultiLineInputBox", "WithPreview"],
31-
"type:listPage": [
32-
"ImageLink",
33-
"{\"url\":\"{{record.photos.[0]}}\",\"imgSrc\":\"{{record.photos.[0]}}\"}"
34-
],
35-
"type:getPage": [
36-
"ImageLink",
37-
"{\"url\":\"{{record.photos.[0]}}\",\"imgSrc\":\"{{record.photos.[0]}}\"}"
38-
]
39-
},
40-
{ "id": "isAlive", "name": "Alive", "type": "BOOL" }
41-
]
42-
}
43-
]
1+
{
2+
"name": "pet",
3+
"description": "pet database",
4+
"tables": [
5+
{
6+
"name": "dogs",
7+
"columns": [
8+
{
9+
"id": "name",
10+
"name": "Name",
11+
"type": "STRING",
12+
"primary": true,
13+
"ui:createUpdatePage:placeholder": "Please fill name"
14+
},
15+
{ "id": "age", "name": "Age", "type": "NUMBER" },
16+
{
17+
"id": "color",
18+
"name": "Color",
19+
"type": "STRING",
20+
"ui:createUpdatePage:enum": ["white", "black"],
21+
"type:createUpdatePage": "RadioGroup"
22+
},
23+
{
24+
"id": "tags",
25+
"name": "Tags",
26+
"type": "STRING_ARRAY",
27+
"ui:presets": ["spike", "cookie"]
28+
},
29+
{
30+
"id": "photos",
31+
"name": "Photos",
32+
"type": "STRING_ARRAY",
33+
"type:createUpdatePage": ["MultiLineInputBox", "WithPreview"],
34+
"type:listPage": [
35+
"ImageLink",
36+
"{\"url\":\"{{record.photos.[0]}}\",\"imgSrc\":\"{{record.photos.[0]}}\"}"
37+
],
38+
"type:getPage": [
39+
"ImageLink",
40+
"{\"url\":\"{{record.photos.[0]}}\",\"imgSrc\":\"{{record.photos.[0]}}\"}"
41+
]
42+
},
43+
{ "id": "isAlive", "name": "Alive", "type": "BOOL" }
44+
]
45+
}
46+
]
47+
}

0 commit comments

Comments
 (0)