2023-01-09 12:35:05 +00:00
|
|
|
import { Sequelize } from 'sequelize';
|
2022-12-19 12:21:35 +00:00
|
|
|
|
2023-05-30 09:46:46 +00:00
|
|
|
const config = {
|
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: {
|
2023-01-16 13:52:08 +00:00
|
|
|
type: Sequelize.STRING(2000),
|
2023-01-09 12:35:05 +00:00
|
|
|
},
|
|
|
|
tokenExpiration: {
|
2023-05-05 09:48:44 +00:00
|
|
|
type: Sequelize.DATE,
|
2023-01-09 12:35:05 +00:00
|
|
|
},
|
2022-12-19 12:21:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default (sequelize) => {
|
2023-05-30 09:46:46 +00:00
|
|
|
return sequelize.define(
|
|
|
|
'config',
|
|
|
|
config,
|
2023-01-09 12:35:05 +00:00
|
|
|
{
|
|
|
|
timestamps: false,
|
|
|
|
freezeTableName: true,
|
|
|
|
}
|
|
|
|
);
|
2022-12-19 12:21:35 +00:00
|
|
|
};
|