organize general routes

This commit is contained in:
Arjun Patel
2019-01-19 00:42:56 -08:00
parent 59c327d8df
commit fc2b73b715
18 changed files with 154 additions and 83 deletions
+34
View File
@@ -0,0 +1,34 @@
module.exports = (sequelize, DataTypes) => {
const Grant = sequelize.define('grants', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
name: {
type: DataTypes.STRING,
allowNull: false
},
amount: {
type: DataTypes.INTEGER,
allowNull: false
},
last_payment: {
type: DataTypes.DATE,
default: new Date()
},
monthly: {
type: DataTypes.BOOLEAN,
allowNull: false
},
num_causes: {
type: DataTypes.INTEGER,
allowNull: false
},
num_regions: {
type: DataTypes.INTEGER,
allowNull: false
}
});
return Grant;
};