Created
August 29, 2017 00:59
-
-
Save Abazhenov/dcfe893490fac49e0782df4d5111ebbc to your computer and use it in GitHub Desktop.
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
const db = require('../_db'); | |
const Sequelize = require('sequelize'); | |
class story extends Sequelize.Model { | |
//methods, hooks, etc.... | |
} | |
story.init({ | |
title: { | |
type: Sequelize.STRING, | |
allowNull: false, | |
}, | |
content: { | |
type: Sequelize.TEXT, | |
allowNull: false, | |
} | |
},{ | |
sequelize: db, | |
tableName: 'story', | |
}); | |
module.exports = story |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment