summaryrefslogtreecommitdiff
path: root/src/TroffmanDatabase.js
blob: 58e7608e7eb7bb011d64bb8e519be5b66dde9db1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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,
            },
        });
    }
};