You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Global-sales/wai-server/models/webhook_logs.js

49 lines
1.0 KiB
JavaScript

const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define(
'webhook_logs',
{
id: {
autoIncrement: true,
type: DataTypes.BIGINT,
allowNull: false,
primaryKey: true,
},
event: {
type: DataTypes.STRING(100),
allowNull: false,
},
event_id: {
type: DataTypes.STRING(100),
allowNull: true,
},
data_id: {
type: DataTypes.STRING(100),
allowNull: true,
},
createtime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
},
updatetime: {
type: DataTypes.DATE,
allowNull: true,
},
},
{
sequelize,
tableName: 'webhook_logs',
timestamps: false,
indexes: [
{
name: 'PRIMARY',
unique: true,
using: 'BTREE',
fields: [{ name: 'id' }],
},
],
},
);
};