Files
Ucharify_api/app/models/organization.model.js
T
2019-01-20 22:51:08 -08:00

16 lines
511 B
JavaScript

module.exports = (sequelize, DataTypes) => {
const Organization = 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 },
rating: { type: DataTypes.INTEGER, defaultValue: 0, allowNull: false }
});
return Organization;
};