retropilot-server/src/models/accounts.model.js

58 lines
1015 B
JavaScript
Raw Normal View History

2022-01-12 08:02:30 -07:00
import { DataTypes } from 'sequelize';
2021-10-02 16:11:51 -06:00
2022-03-21 17:38:56 -06:00
import sequelize from './orm';
const Accounts = sequelize.define('accounts', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: DataTypes.INTEGER,
},
email: {
allowNull: false,
type: DataTypes.TEXT,
},
password: {
allowNull: true,
type: DataTypes.TEXT,
},
created: {
allowNull: true,
type: DataTypes.BIGINT,
},
last_ping: {
allowNull: true,
type: DataTypes.BIGINT,
},
'2fa_token': {
allowNull: true,
type: DataTypes.TEXT,
},
admin: {
allowNull: true,
type: DataTypes.BOOLEAN,
},
email_verify_token: {
allowNull: true,
type: DataTypes.TEXT,
},
g_oauth_sub: {
allowNull: true,
type: DataTypes.TEXT,
},
two_factor_enabled: {
allowNull: true,
type: DataTypes.BOOLEAN,
},
research_enabled: {
allowNull: false,
type: DataTypes.BOOLEAN,
defaultValue: false,
},
2022-03-21 17:38:56 -06:00
}, {
timestamps: false,
});
export default Accounts;