Created
February 22, 2016 08:02
-
-
Save aldidas/304353410d9b0c0c8807 to your computer and use it in GitHub Desktop.
model.js express.js app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Sequelize = require('sequelize'), | |
c = require('./conf'); | |
var Post = c.config.db.define( 'post', { | |
postTitle: { | |
type: Sequelize.STRING, | |
field: 'post_title' | |
}, | |
postContent: { | |
type: Sequelize.TEXT, | |
field: 'post_content' | |
} | |
} , { | |
timestamps: true | |
}); | |
exports.models = { | |
post: Post | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment