generated from Baipyrus/DiscordJS-Template
added voice channels to database
This commit is contained in:
parent
56a2c697dc
commit
1f5f5621c3
@ -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
10
models/voiceChannel.js
Normal file
@ -0,0 +1,10 @@
|
||||
import { DataTypes } from "sequelize";
|
||||
|
||||
export default function(sequelize) {
|
||||
return sequelize.define('VoiceChannel', {
|
||||
id: {
|
||||
type: DataTypes.STRING,
|
||||
primaryKey: true,
|
||||
},
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user