summaryrefslogtreecommitdiff
path: root/src/TroffmanDatabase.js
diff options
context:
space:
mode:
authorAlejandro Sior <aho@sio.be>2021-02-19 11:43:18 +0100
committerAlejandro Sior <aho@sio.be>2021-02-19 11:43:18 +0100
commit405051211d60afa8a7fc4fc3fa5ffb456242973d (patch)
treedbae34350c3a54f422da70f1b7fbd857a8f5a116 /src/TroffmanDatabase.js
initial commit
Diffstat (limited to 'src/TroffmanDatabase.js')
-rw-r--r--src/TroffmanDatabase.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/TroffmanDatabase.js b/src/TroffmanDatabase.js
new file mode 100644
index 0000000..58e7608
--- /dev/null
+++ b/src/TroffmanDatabase.js
@@ -0,0 +1,25 @@
+const Sequelize = require('sequelize');
+
+module.exports = class TroffmanDatabase extends Sequelize {
+ constructor(path) {
+ super('database', 'user', 'password', {
+ host: 'localhost',
+ dialect: 'sqlite',
+ logging: false,
+ storage: path,
+ });
+
+ this.Auser = this.define('ausers', {
+ userId: {
+ type: Sequelize.STRING,
+ unique: true,
+ },
+ });
+ this.Aguild = this.define('aguilds', {
+ guildId: {
+ type: Sequelize.STRING,
+ unique: true,
+ },
+ });
+ }
+};