Postgres.
This commit is contained in:
parent
695644c260
commit
806f42e3f8
25 changed files with 501 additions and 294 deletions
15
models/login.js
Normal file
15
models/login.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
export default function (sequelize, DataTypes) {
|
||||
const Login = sequelize.define('login', {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
successful: { type: DataTypes.BOOLEAN },
|
||||
ip: { type: 'inet' },
|
||||
}, {
|
||||
classMethods: {
|
||||
associate: (models) => {
|
||||
Login.belongsTo(models.user);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return Login;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue