diff --git a/common/models/blogpost.js b/common/models/blogpost.js new file mode 100644 index 0000000..927d563 --- /dev/null +++ b/common/models/blogpost.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Blogpost) { + +}; diff --git a/common/models/map.js b/common/models/map.js new file mode 100644 index 0000000..89315b1 --- /dev/null +++ b/common/models/map.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Map) { + +}; diff --git a/common/models/map.json b/common/models/map.json new file mode 100644 index 0000000..8d41136 --- /dev/null +++ b/common/models/map.json @@ -0,0 +1,99 @@ +{ + "name": "Map", + "base": "PersistedModel", + "idInjection": false, + "options": { + "validateUpsert": true + }, + "mysql": { + "schema": "loopbackDb", + "table": "Map" + }, + "properties": { + "userid": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "userID", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "Y" + }, + "_selectable": true + }, + "locationname": { + "type": "String", + "required": false, + "length": 255, + "precision": null, + "scale": null, + "mysql": { + "columnName": "locationName", + "dataType": "varchar", + "dataLength": 255, + "dataPrecision": null, + "dataScale": null, + "nullable": "Y" + }, + "_selectable": true + }, + "longitude": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "longitude", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "Y" + }, + "_selectable": true + }, + "latitude": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "latitude", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "Y" + }, + "_selectable": true + }, + "id": { + "type": "Number", + "id": true, + "required": false, + "length": null, + "precision": 10, + "scale": 0, + "mysql": { + "columnName": "id", + "dataType": "int", + "dataLength": null, + "dataPrecision": 10, + "dataScale": 0, + "nullable": "N" + }, + "_selectable": false + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/common/models/maps.ts b/common/models/map.ts similarity index 74% rename from common/models/maps.ts rename to common/models/map.ts index d5b6f90..fe9639a 100644 --- a/common/models/maps.ts +++ b/common/models/map.ts @@ -1,8 +1,8 @@ import { Model } from '@mean-expert/model'; /** - * @module Maps + * @module Map * @description - * Write a useful Maps Model description. + * Write a useful Map Model description. * Register hooks and remote methods within the * Model Decorator **/ @@ -11,9 +11,9 @@ import { Model } from '@mean-expert/model'; remotes: {} }) -class Maps { +class Map { // LoopBack model instance is injected in constructor constructor(public model: any) { } } -module.exports = Maps; +module.exports = Map; diff --git a/common/models/maps.json b/common/models/maps.json deleted file mode 100644 index 707ddb9..0000000 --- a/common/models/maps.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "maps", - "base": "PersistedModel", - "strict": false, - "idInjection": false, - "options": { - "validateUpsert": true - }, - "properties": { - "id": { - "type": "string", - "id": true, - "required": false - }, - "latitude": { - "type": "string" - }, - "longitude": { - "type": "string" - }, - "userID": { - "type": "string" - }, - "locationName": { - "type": "string" - } - }, - "validations": [], - "relations": {}, - "acls": [], - "methods": {} -} diff --git a/common/models/profile-data.json b/common/models/profile-data.json deleted file mode 100644 index 935710a..0000000 --- a/common/models/profile-data.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "profileData", - "base": "PersistedModel", - "idInjection": true, - "options": { - "validateUpsert": true - }, - "properties": { - "fullName": { - "type": "string", - "required": true - }, - "address": { - "type": "string", - "required": true - }, - "email": { - "type": "string", - "required": true - }, - "placeOfBirth": { - "type": "string", - "required": true - }, - "birthDate": { - "type": "date", - "required": true - }, - "noPhone": { - "type": "string", - "required": true - }, - "photoProfile": { - "type": "string", - "required": true - } - }, - "validations": [], - "relations": {}, - "acls": [], - "methods": {} -} diff --git a/common/models/profiledata.json b/common/models/profiledata.json new file mode 100644 index 0000000..223dda3 --- /dev/null +++ b/common/models/profiledata.json @@ -0,0 +1,163 @@ +{ + "name": "Profiledata", + "base": "PersistedModel", + "idInjection": false, + "options": { + "validateUpsert": true + }, + "mysql": { + "schema": "loopbackDb", + "table": "profileData" + }, + "properties": { + "id": { + "type": "Number", + "id": true, + "required": false, + "length": null, + "precision": 10, + "scale": 0, + "mysql": { + "columnName": "id", + "dataType": "int", + "dataLength": null, + "dataPrecision": 10, + "dataScale": 0, + "nullable": "N" + }, + "_selectable": false + }, + "photoprofile": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "photoProfile", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + }, + "folder": { + "type": "String", + "required": false, + "length": 45, + "precision": null, + "scale": null, + "mysql": { + "columnName": "folder", + "dataType": "varchar", + "dataLength": 45, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + }, + "placeofbirth": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "placeOfBirth", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + }, + "nophone": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "noPhone", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + }, + "fullname": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "fullName", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + }, + "email": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "email", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + }, + "birthdate": { + "type": "Date", + "required": false, + "length": null, + "precision": null, + "scale": null, + "mysql": { + "columnName": "birthDate", + "dataType": "date", + "dataLength": null, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + }, + "address": { + "type": "String", + "required": false, + "length": 512, + "precision": null, + "scale": null, + "mysql": { + "columnName": "address", + "dataType": "varchar", + "dataLength": 512, + "dataPrecision": null, + "dataScale": null, + "nullable": "N" + }, + "_selectable": false + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/common/models/profile-data.ts b/common/models/profiledata.ts similarity index 100% rename from common/models/profile-data.ts rename to common/models/profiledata.ts diff --git a/server/model-config.json b/server/model-config.json index 34d0a68..94d789c 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -50,16 +50,6 @@ "dataSource": "storageSimpleUpload", "public": true }, - "profileData": { - "dataSource": "db", - "public": true - }, - "maps": { - "dataSource": "db", - "public": true, - "$promise": {}, - "$resolved": true - }, "Todo": { "dataSource": "db", "public": true, @@ -81,5 +71,17 @@ "StorageUpload": { "dataSource": "StorageUpload", "public": true + }, + "Map": { + "dataSource": "db", + "public": true + }, + "Profiledata": { + "dataSource": "db", + "public": true + }, + "Blogpost": { + "dataSource": "db", + "public": true } } diff --git a/server/storage/Angular/.gitignore b/server/storage/Angular/.gitignore deleted file mode 100644 index 86d0cb2..0000000 --- a/server/storage/Angular/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file