mirror of
https://gitlab.com/ceda_ei/git-alerts-bot
synced 2025-11-04 14:20:07 +01:00
Update .gitignore. Add database related models, data.
This commit is contained in:
3
models/index.js
Normal file
3
models/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = sequelize => ({
|
||||
integrations: require("./integrations")(sequelize),
|
||||
});
|
||||
12
models/integrations.js
Normal file
12
models/integrations.js
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
};
|
||||
Reference in New Issue
Block a user