From b5b741695375f4b942be4b2485b65c78965d51f2 Mon Sep 17 00:00:00 2001 From: Ryan Graham Date: Thu, 20 Apr 2017 13:44:02 -0700 Subject: [PATCH] sails generate model Post title:string body:text --- sails-blog/api/models/Post.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sails-blog/api/models/Post.js diff --git a/sails-blog/api/models/Post.js b/sails-blog/api/models/Post.js new file mode 100644 index 0000000..82a0b67 --- /dev/null +++ b/sails-blog/api/models/Post.js @@ -0,0 +1,17 @@ +/** + * Post.js + * + * @description :: TODO: You might write a short summary of how this model works and what it represents here. + * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models + */ + +module.exports = { + + attributes: { + + title : { type: 'string' }, + + body : { type: 'text' } + } +}; +