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 } }