floriday/models/clientConfig.js

34 lines
657 B
JavaScript

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