Skip to content

Commit

Permalink
lb model Post
Browse files Browse the repository at this point in the history
  • Loading branch information
rmg committed Apr 20, 2017
1 parent ed4f0a5 commit 25a6737
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions loopback-blog/common/models/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = function(Post) {

};
23 changes: 23 additions & 0 deletions loopback-blog/common/models/post.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "Post",
"plural": "posts",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"title": {
"type": "string",
"required": true
},
"body": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}
4 changes: 4 additions & 0 deletions loopback-blog/server/model-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
"Author": {
"dataSource": null,
"public": true
},
"Post": {
"dataSource": null,
"public": true
}
}

0 comments on commit 25a6737

Please sign in to comment.