Use sequelize

This commit is contained in:
2022-04-17 15:19:12 +02:00
parent 6eccae8721
commit be2991cd50
8 changed files with 1316 additions and 31 deletions

25
models/guild.js Normal file
View File

@@ -0,0 +1,25 @@
'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class Guild extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
Guild.init({
gid: DataTypes.STRING,
adminRole: DataTypes.STRING,
owderId: DataTypes.STRING
}, {
sequelize,
modelName: 'Guild',
});
return Guild;
};