git-alerts-bot/models/integrations.js

13 lines
588 B
JavaScript

const Sequelize = require("sequelize");
module.exports = sequelize => {
const integrations = sequelize.define("integrations", {
chatID: { type: Sequelize.INTEGER, allowNull: false, unique: "com"},
repoURL: {type: Sequelize.STRING, allowNull: false, unique: "com"},
chatType: {type: Sequelize.STRING},
issues: {type: Sequelize.BOOLEAN, defaultValue: false},
pullRequests: {type: Sequelize.BOOLEAN, defaultValue: false},
commits: {type: Sequelize.BOOLEAN, defaultValue: true},
});
integrations.sync().then(return integration);
};