@speakr/speakr-module-services
Version:
SPEAKR Shared Service Module
61 lines (58 loc) • 1.2 kB
JavaScript
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
let accounts_networks = sequelize.define('accounts_networks', {
id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true
},
account_id: {
type: DataTypes.INTEGER,
allowNull: true,
references: {
model: 'accounts',
key: 'id'
}
},
network_id: {
type: DataTypes.INTEGER,
allowNull: true,
references: {
model: 'networks',
key: 'id'
}
},
created_at: {
type: DataTypes.DATE,
allowNull: false
},
updated_at: {
type: DataTypes.DATE,
allowNull: false
},
deleted_at: {
type: DataTypes.DATE,
allowNull: true
},
external: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false
},
deleted: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: false
},
last_deleted_date: {
type: DataTypes.DATE,
allowNull: true
}
}, {
tableName: 'accounts_networks_tb',
underscored: true,
paranoid: true
});
return accounts_networks;
};