From 89fc0332ad34e8f3002838575910a1059a6b1475 Mon Sep 17 00:00:00 2001 From: Ryan Graham Date: Thu, 20 Apr 2017 11:55:29 -0700 Subject: [PATCH] lb model Comment --- loopback-blog/common/models/comment.js | 5 +++++ loopback-blog/common/models/comment.json | 19 +++++++++++++++++++ loopback-blog/server/model-config.json | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 loopback-blog/common/models/comment.js create mode 100644 loopback-blog/common/models/comment.json diff --git a/loopback-blog/common/models/comment.js b/loopback-blog/common/models/comment.js new file mode 100644 index 0000000..1aa19e4 --- /dev/null +++ b/loopback-blog/common/models/comment.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Comment) { + +}; diff --git a/loopback-blog/common/models/comment.json b/loopback-blog/common/models/comment.json new file mode 100644 index 0000000..824da1c --- /dev/null +++ b/loopback-blog/common/models/comment.json @@ -0,0 +1,19 @@ +{ + "name": "Comment", + "plural": "comments", + "base": "PersistedModel", + "idInjection": true, + "options": { + "validateUpsert": true + }, + "properties": { + "body": { + "type": "string", + "required": true + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/loopback-blog/server/model-config.json b/loopback-blog/server/model-config.json index d415bce..7873d61 100644 --- a/loopback-blog/server/model-config.json +++ b/loopback-blog/server/model-config.json @@ -20,5 +20,9 @@ "Post": { "dataSource": null, "public": true + }, + "Comment": { + "dataSource": null, + "public": true } }