env variables through different file and optimizing error handling with middleware

This commit is contained in:
Arjun Patel
2019-01-13 22:38:44 -08:00
parent 43bf237942
commit 23f40dc73b
13 changed files with 111 additions and 119 deletions
+21
View File
@@ -0,0 +1,21 @@
module.exports = (sequelize, DataTypes) => {
const Campaigns = sequelize.define('campaigns', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
// user_id: {
// type: DataTypes.INTEGER,
// references: {
// // This is a reference to another model
// model: Donors,
// // This is the column name of the referenced model
// key: 'id'
// }
// },
name: DataTypes.STRING,
amount: DataTypes.INTEGER
});
return Campaigns;
};