model set up and associations

This commit is contained in:
Arjun Patel
2019-01-15 23:14:05 -08:00
parent a4e4394329
commit 86dd4c8cdb
8 changed files with 59 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
module.exports = (sequelize, DataTypes) => {
const Organizations = sequelize.define('organizations', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
name: { type: DataTypes.STRING, allowNull: false },
short_description: DataTypes.STRING,
primary_cause: { type: DataTypes.STRING, allowNull: false },
primary_region: { type: DataTypes.STRING, allowNull: false }
});
return Organizations;
};