Skip to content

Commit 3465ab3

Browse files
author
Rendy Sutandy
committed
change map.json to map.ts
1 parent 99c6a9d commit 3465ab3

2 files changed

Lines changed: 118 additions & 0 deletions

File tree

common/models/map.json

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"name": "Map",
3+
"base": "PersistedModel",
4+
"idInjection": false,
5+
"options": {
6+
"validateUpsert": true
7+
},
8+
"mysql": {
9+
"schema": "loopbackDb",
10+
"table": "Map"
11+
},
12+
"properties": {
13+
"userid": {
14+
"type": "String",
15+
"required": false,
16+
"length": 512,
17+
"precision": null,
18+
"scale": null,
19+
"mysql": {
20+
"columnName": "userID",
21+
"dataType": "varchar",
22+
"dataLength": 512,
23+
"dataPrecision": null,
24+
"dataScale": null,
25+
"nullable": "Y"
26+
},
27+
"_selectable": true
28+
},
29+
"locationname": {
30+
"type": "String",
31+
"required": false,
32+
"length": 255,
33+
"precision": null,
34+
"scale": null,
35+
"mysql": {
36+
"columnName": "locationName",
37+
"dataType": "varchar",
38+
"dataLength": 255,
39+
"dataPrecision": null,
40+
"dataScale": null,
41+
"nullable": "Y"
42+
},
43+
"_selectable": true
44+
},
45+
"longitude": {
46+
"type": "String",
47+
"required": false,
48+
"length": 512,
49+
"precision": null,
50+
"scale": null,
51+
"mysql": {
52+
"columnName": "longitude",
53+
"dataType": "varchar",
54+
"dataLength": 512,
55+
"dataPrecision": null,
56+
"dataScale": null,
57+
"nullable": "Y"
58+
},
59+
"_selectable": true
60+
},
61+
"latitude": {
62+
"type": "String",
63+
"required": false,
64+
"length": 512,
65+
"precision": null,
66+
"scale": null,
67+
"mysql": {
68+
"columnName": "latitude",
69+
"dataType": "varchar",
70+
"dataLength": 512,
71+
"dataPrecision": null,
72+
"dataScale": null,
73+
"nullable": "Y"
74+
},
75+
"_selectable": true
76+
},
77+
"id": {
78+
"type": "Number",
79+
"id": true,
80+
"required": false,
81+
"length": null,
82+
"precision": 10,
83+
"scale": 0,
84+
"mysql": {
85+
"columnName": "id",
86+
"dataType": "int",
87+
"dataLength": null,
88+
"dataPrecision": 10,
89+
"dataScale": 0,
90+
"nullable": "N"
91+
},
92+
"_selectable": false
93+
}
94+
},
95+
"validations": [],
96+
"relations": {},
97+
"acls": [],
98+
"methods": {}
99+
}

common/models/map.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Model } from '@mean-expert/model';
2+
/**
3+
* @module Map
4+
* @description
5+
* Write a useful Map Model description.
6+
* Register hooks and remote methods within the
7+
* Model Decorator
8+
**/
9+
@Model({
10+
hooks: {},
11+
remotes: {}
12+
})
13+
14+
class Map {
15+
// LoopBack model instance is injected in constructor
16+
constructor(public model: any) { }
17+
}
18+
19+
module.exports = Map;

0 commit comments

Comments
 (0)