Basic User and Guild registration
This commit is contained in:
@@ -14,9 +14,9 @@ module.exports = (sequelize, DataTypes) => {
|
||||
}
|
||||
}
|
||||
Guild.init({
|
||||
gid: DataTypes.STRING,
|
||||
adminRole: DataTypes.STRING,
|
||||
owderId: DataTypes.STRING
|
||||
guildID: DataTypes.STRING,
|
||||
adminRoleID: DataTypes.STRING,
|
||||
owderID: DataTypes.STRING
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'Guild',
|
||||
|
||||
25
models/user.js
Normal file
25
models/user.js
Normal file
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
const {
|
||||
Model
|
||||
} = require('sequelize');
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class User 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
|
||||
}
|
||||
}
|
||||
User.init({
|
||||
userID: DataTypes.STRING,
|
||||
banned: DataTypes.BOOLEAN,
|
||||
registredAt: DataTypes.DATE
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'User',
|
||||
});
|
||||
return User;
|
||||
};
|
||||
Reference in New Issue
Block a user