added voice channels to database

This commit is contained in:
Baipyrus 2024-01-29 00:32:32 +01:00
parent 56a2c697dc
commit 1f5f5621c3
2 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import defineRoleEmojiPair from './models/roleEmojiPair.js';
import defineVoiceChannel from './models/voiceChannel.js';
import defineMessage from './models/message.js';
import { Sequelize } from 'sequelize';
import { config } from 'dotenv';
@ -12,8 +13,9 @@ const sequelize = new Sequelize(DB_NAME, DB_USER, DB_PWD, {
host: DB_HOST,
});
const RoleEmojiPair = defineRoleEmojiPair(sequelize);
const VoiceChannel = defineVoiceChannel(sequelize);
const Message = defineMessage(sequelize);
sequelize.sync();
export { sequelize, RoleEmojiPair, Message };
export { sequelize, RoleEmojiPair, VoiceChannel, Message };

10
models/voiceChannel.js Normal file
View File

@ -0,0 +1,10 @@
import { DataTypes } from "sequelize";
export default function(sequelize) {
return sequelize.define('VoiceChannel', {
id: {
type: DataTypes.STRING,
primaryKey: true,
},
});
}