From e3c5f36539c9bdd100c1db08d5506de31e668149 Mon Sep 17 00:00:00 2001 From: Rendy Sutandy Date: Thu, 24 Aug 2017 19:41:19 +0700 Subject: [PATCH 01/17] add a json field 'container' --- common/models/profile-data.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/models/profile-data.json b/common/models/profile-data.json index 935710a..77ad8fc 100644 --- a/common/models/profile-data.json +++ b/common/models/profile-data.json @@ -30,6 +30,10 @@ "type": "string", "required": true }, + "folder": { + "type": "string", + "required": true + }, "photoProfile": { "type": "string", "required": true From 434bcc5a11943c965af0019c89420750a17e0cea Mon Sep 17 00:00:00 2001 From: Rendy Sutandy Date: Thu, 24 Aug 2017 19:41:31 +0700 Subject: [PATCH 02/17] change a datasource --- server/datasources.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/datasources.json b/server/datasources.json index 8cccedd..7a80b90 100644 --- a/server/datasources.json +++ b/server/datasources.json @@ -1,8 +1,12 @@ { "db": { "name": "db", - "connector": "memory", - "file": "mydata.json" + "connector": "mysql", + "host": "174.138.24.126", + "port": 3306, + "database": "loopbackDb", + "password": "lbP4ss4Acc3ss", + "user": "loopbackuser" }, "storageSimpleUpload": { "name": "storageSimpleUpload", From 27c952aba2c1d3e12c8589c1bab1d880a3a190f6 Mon Sep 17 00:00:00 2001 From: Fuguh Budi Utomo Date: Fri, 25 Aug 2017 15:00:05 +0700 Subject: [PATCH 03/17] add blog post model-config.json --- server/model-config.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/model-config.json b/server/model-config.json index 34d0a68..39011b8 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -81,5 +81,9 @@ "StorageUpload": { "dataSource": "StorageUpload", "public": true + }, + "blogPost": { + "dataSource": "db", + "public": true } } From 316054aca1d65185709f59f1248164abb9dcbcec Mon Sep 17 00:00:00 2001 From: Fuguh Budi Utomo Date: Fri, 25 Aug 2017 15:00:21 +0700 Subject: [PATCH 04/17] add blog post model blog-post.js --- common/models/blog-post.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 common/models/blog-post.js diff --git a/common/models/blog-post.js b/common/models/blog-post.js new file mode 100644 index 0000000..927d563 --- /dev/null +++ b/common/models/blog-post.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Blogpost) { + +}; From fb8311694b89f76c78bb381aebf71ce784ec5edf Mon Sep 17 00:00:00 2001 From: Fuguh Budi Utomo Date: Fri, 25 Aug 2017 15:00:55 +0700 Subject: [PATCH 05/17] add model blog-post.json --- common/models/blog-post.json | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 common/models/blog-post.json diff --git a/common/models/blog-post.json b/common/models/blog-post.json new file mode 100644 index 0000000..725f43b --- /dev/null +++ b/common/models/blog-post.json @@ -0,0 +1,28 @@ +{ + "name": "blogPost", + "base": "PersistedModel", + "strict": false, + "idInjection": false, + "options": { + "validateUpsert": true + }, + "properties": { + "postContent": { + "type": "any" + }, + "postDate": { + "type": "date" + }, + "postId": { + "type": "string", + "id": true + }, + "postTitle": { + "type": "string" + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} From c0ae28a0004d8ac679a2061c22d7ab5d2f692aec Mon Sep 17 00:00:00 2001 From: Fuguh Budi Utomo Date: Mon, 28 Aug 2017 17:05:08 +0700 Subject: [PATCH 06/17] rename maps to maps --- common/models/maps.json | 32 -------------------------------- common/models/maps.ts | 19 ------------------- 2 files changed, 51 deletions(-) delete mode 100644 common/models/maps.json delete mode 100644 common/models/maps.ts 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/maps.ts b/common/models/maps.ts deleted file mode 100644 index d5b6f90..0000000 --- a/common/models/maps.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Model } from '@mean-expert/model'; -/** - * @module Maps - * @description - * Write a useful Maps Model description. - * Register hooks and remote methods within the - * Model Decorator - **/ -@Model({ - hooks: {}, - remotes: {} -}) - -class Maps { - // LoopBack model instance is injected in constructor - constructor(public model: any) { } -} - -module.exports = Maps; From a8b5bcb3daa63d5f9b160da6abe15f0e9b04ef0b Mon Sep 17 00:00:00 2001 From: Fuguh Budi Utomo Date: Mon, 28 Aug 2017 17:05:52 +0700 Subject: [PATCH 07/17] add map model --- common/models/map.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 common/models/map.js 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) { + +}; From 2bcd518eacf95e7af04b0fa63b00be238012282e Mon Sep 17 00:00:00 2001 From: Fuguh Budi Utomo Date: Mon, 28 Aug 2017 17:06:11 +0700 Subject: [PATCH 08/17] add map model json --- common/models/map.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 common/models/map.json diff --git a/common/models/map.json b/common/models/map.json new file mode 100644 index 0000000..4bc34a3 --- /dev/null +++ b/common/models/map.json @@ -0,0 +1,30 @@ +{ + "name": "Map", + "plural": "Maps", + "base": "PersistedModel", + "idInjection": true, + "options": { + "validateUpsert": true + }, + "mixins": { + "FireLoop": true + }, + "properties": { + "userID": { + "type": "string" + }, + "locationName": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "latitude": { + "type": "string" + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} From 37046a647ce9027daa54da3ca4ffd3cd98d0f95b Mon Sep 17 00:00:00 2001 From: Fuguh Budi Utomo Date: Mon, 28 Aug 2017 17:06:29 +0700 Subject: [PATCH 09/17] change from maps to map --- server/model-config.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/model-config.json b/server/model-config.json index 34d0a68..525f646 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -54,12 +54,6 @@ "dataSource": "db", "public": true }, - "maps": { - "dataSource": "db", - "public": true, - "$promise": {}, - "$resolved": true - }, "Todo": { "dataSource": "db", "public": true, @@ -81,5 +75,9 @@ "StorageUpload": { "dataSource": "StorageUpload", "public": true + }, + "Map": { + "dataSource": "db", + "public": true } } From 3465ab33c601a27832c142fe07d77588a798f55b Mon Sep 17 00:00:00 2001 From: Rendy Sutandy Date: Tue, 29 Aug 2017 19:53:17 +0700 Subject: [PATCH 10/17] change map.json to map.ts --- common/models/map.json | 99 ++++++++++++++++++++++++++++++++++++++++++ common/models/map.ts | 19 ++++++++ 2 files changed, 118 insertions(+) create mode 100644 common/models/map.json create mode 100644 common/models/map.ts 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/map.ts b/common/models/map.ts new file mode 100644 index 0000000..fe9639a --- /dev/null +++ b/common/models/map.ts @@ -0,0 +1,19 @@ +import { Model } from '@mean-expert/model'; +/** + * @module Map + * @description + * Write a useful Map Model description. + * Register hooks and remote methods within the + * Model Decorator + **/ +@Model({ + hooks: {}, + remotes: {} +}) + +class Map { + // LoopBack model instance is injected in constructor + constructor(public model: any) { } +} + +module.exports = Map; From d2a6375de0a1e23957af246239f48584c216cbe3 Mon Sep 17 00:00:00 2001 From: Rendy Sutandy Date: Tue, 29 Aug 2017 19:53:32 +0700 Subject: [PATCH 11/17] delete not used file --- common/models/maps.json | 32 --------------------- common/models/maps.ts | 19 ------------- common/models/profile-data.json | 46 ------------------------------- common/models/profile-data.ts | 19 ------------- server/storage/Angular/.gitignore | 4 --- 5 files changed, 120 deletions(-) delete mode 100644 common/models/maps.json delete mode 100644 common/models/maps.ts delete mode 100644 common/models/profile-data.json delete mode 100644 common/models/profile-data.ts delete mode 100644 server/storage/Angular/.gitignore 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/maps.ts b/common/models/maps.ts deleted file mode 100644 index d5b6f90..0000000 --- a/common/models/maps.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Model } from '@mean-expert/model'; -/** - * @module Maps - * @description - * Write a useful Maps Model description. - * Register hooks and remote methods within the - * Model Decorator - **/ -@Model({ - hooks: {}, - remotes: {} -}) - -class Maps { - // LoopBack model instance is injected in constructor - constructor(public model: any) { } -} - -module.exports = Maps; diff --git a/common/models/profile-data.json b/common/models/profile-data.json deleted file mode 100644 index 77ad8fc..0000000 --- a/common/models/profile-data.json +++ /dev/null @@ -1,46 +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 - }, - "folder": { - "type": "string", - "required": true - }, - "photoProfile": { - "type": "string", - "required": true - } - }, - "validations": [], - "relations": {}, - "acls": [], - "methods": {} -} diff --git a/common/models/profile-data.ts b/common/models/profile-data.ts deleted file mode 100644 index d48eb8d..0000000 --- a/common/models/profile-data.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Model } from '@mean-expert/model'; -/** - * @module Profiledata - * @description - * Write a useful Profiledata Model description. - * Register hooks and remote methods within the - * Model Decorator - **/ -@Model({ - hooks: {}, - remotes: {} -}) - -class Profiledata { - // LoopBack model instance is injected in constructor - constructor(public model: any) { } -} - -module.exports = Profiledata; 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 From e46c37480fa5f9ee35af01ba6a8fa2c8c80097a4 Mon Sep 17 00:00:00 2001 From: Rendy Sutandy Date: Tue, 29 Aug 2017 19:53:46 +0700 Subject: [PATCH 12/17] add new api profile data --- common/models/profiledata.json | 163 +++++++++++++++++++++++++++++++++ common/models/profiledata.ts | 19 ++++ 2 files changed, 182 insertions(+) create mode 100644 common/models/profiledata.json create mode 100644 common/models/profiledata.ts 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/profiledata.ts b/common/models/profiledata.ts new file mode 100644 index 0000000..d48eb8d --- /dev/null +++ b/common/models/profiledata.ts @@ -0,0 +1,19 @@ +import { Model } from '@mean-expert/model'; +/** + * @module Profiledata + * @description + * Write a useful Profiledata Model description. + * Register hooks and remote methods within the + * Model Decorator + **/ +@Model({ + hooks: {}, + remotes: {} +}) + +class Profiledata { + // LoopBack model instance is injected in constructor + constructor(public model: any) { } +} + +module.exports = Profiledata; From af1a9473a11ce4df5ef7a4880fd6d97a19a0440d Mon Sep 17 00:00:00 2001 From: Rendy Sutandy Date: Tue, 29 Aug 2017 19:53:55 +0700 Subject: [PATCH 13/17] add new model --- server/model-config.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/server/model-config.json b/server/model-config.json index 75db8ec..cb4f8a7 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,13 @@ "StorageUpload": { "dataSource": "StorageUpload", "public": true + }, + "Map": { + "dataSource": "db", + "public": true + }, + "Profiledata": { + "dataSource": "db", + "public": true } } From c237b25264f816b41b7893c4d2679febc9e1a243 Mon Sep 17 00:00:00 2001 From: fuguh budi utomo Date: Wed, 6 Sep 2017 17:13:08 +0700 Subject: [PATCH 14/17] change blogPost to BlogPost --- server/model-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/model-config.json b/server/model-config.json index 21350ed..94d789c 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -80,7 +80,7 @@ "dataSource": "db", "public": true }, - "blogPost": { + "Blogpost": { "dataSource": "db", "public": true } From 6e689ec4055ed5aae54c15e83f3c6df4fd3a3fff Mon Sep 17 00:00:00 2001 From: fuguh budi utomo Date: Wed, 6 Sep 2017 17:13:28 +0700 Subject: [PATCH 15/17] delete blog-post --- common/models/blog-post.js | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 common/models/blog-post.js diff --git a/common/models/blog-post.js b/common/models/blog-post.js deleted file mode 100644 index 927d563..0000000 --- a/common/models/blog-post.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function(Blogpost) { - -}; From d12d2e64f2270c28a713679117b287d2c98ff489 Mon Sep 17 00:00:00 2001 From: fuguh budi utomo Date: Wed, 6 Sep 2017 17:13:38 +0700 Subject: [PATCH 16/17] delete blog-post.json --- common/models/blog-post.json | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 common/models/blog-post.json diff --git a/common/models/blog-post.json b/common/models/blog-post.json deleted file mode 100644 index 725f43b..0000000 --- a/common/models/blog-post.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "blogPost", - "base": "PersistedModel", - "strict": false, - "idInjection": false, - "options": { - "validateUpsert": true - }, - "properties": { - "postContent": { - "type": "any" - }, - "postDate": { - "type": "date" - }, - "postId": { - "type": "string", - "id": true - }, - "postTitle": { - "type": "string" - } - }, - "validations": [], - "relations": {}, - "acls": [], - "methods": {} -} From 0b781c03935de9ff5757462e8c61445728fd3274 Mon Sep 17 00:00:00 2001 From: fuguh budi utomo Date: Wed, 6 Sep 2017 17:13:52 +0700 Subject: [PATCH 17/17] add blogpost.js --- common/models/blogpost.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 common/models/blogpost.js 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) { + +};