floriday/models/config/config.js

33 lines
596 B
JavaScript

import { Sequelize } from 'sequelize';
const config = {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true,
},
clientId: {
type: Sequelize.STRING,
},
clientSecret: {
type: Sequelize.STRING,
},
currentToken: {
type: Sequelize.STRING(2000),
},
tokenExpiration: {
type: Sequelize.DATE,
},
};
export default (sequelize) => {
return sequelize.define(
'config',
config,
{
timestamps: false,
freezeTableName: true,
}
);
};