2023-01-09 12:35:05 +00:00
|
|
|
import { Sequelize } from 'sequelize';
|
2022-12-19 12:21:35 +00:00
|
|
|
|
|
|
|
const clientConfig = {
|
2023-01-09 12:35:05 +00:00
|
|
|
id: {
|
|
|
|
type: Sequelize.INTEGER,
|
|
|
|
primaryKey: true,
|
|
|
|
autoIncrement: true,
|
|
|
|
},
|
|
|
|
clientId: {
|
|
|
|
type: Sequelize.STRING,
|
|
|
|
},
|
|
|
|
clientSecret: {
|
|
|
|
type: Sequelize.STRING,
|
|
|
|
},
|
|
|
|
currentToken: {
|
|
|
|
type: Sequelize.STRING,
|
|
|
|
},
|
|
|
|
tokenExpiration: {
|
|
|
|
type: Sequelize.STRING,
|
|
|
|
},
|
2022-12-19 12:21:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default (sequelize) => {
|
2023-01-09 12:35:05 +00:00
|
|
|
const ClientConfig = sequelize.define(
|
|
|
|
'FDClientConfig',
|
|
|
|
clientConfig,
|
|
|
|
{
|
|
|
|
timestamps: false,
|
|
|
|
freezeTableName: true,
|
|
|
|
}
|
|
|
|
);
|
|
|
|
return ClientConfig;
|
2022-12-19 12:21:35 +00:00
|
|
|
};
|