summaryrefslogtreecommitdiff
path: root/src/TroffmanDatabase.js
diff options
context:
space:
mode:
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,
+ },
+ });
+ }
+};