@speakr/speakr-module-services
Version:
SPEAKR Shared Service Module
43 lines (41 loc) • 806 B
JavaScript
module.exports = function(sequelize, DataTypes) {
let agencies = sequelize.define('agencies', {
id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true
},
name: {
type: DataTypes.STRING,
allowNull: false
},
description: {
type: DataTypes.STRING,
allowNull: true
},
created_at: {
type: DataTypes.DATE,
allowNull: false
},
updated_at: {
type: DataTypes.DATE,
allowNull: false
},
id_hash: {
type: DataTypes.STRING,
allowNull: false
},
network_id: {
type: DataTypes.INTEGER,
allowNull: true,
references: {
model: 'networks',
key: 'id'
}
}
}, {
underscored: true
});
return agencies;
};