boolean property to note role assignment

This commit is contained in:
Baipyrus 2024-03-03 00:41:04 +01:00
parent 5b7862fe7b
commit aa3eac70ba

View File

@ -3,6 +3,7 @@ import { DataTypes, Sequelize } from 'sequelize';
/** /**
* @typedef {Object} Role * @typedef {Object} Role
* @property {string} id A Discord role ID. * @property {string} id A Discord role ID.
* @property {boolean} assign Whether or not the role should be assigned to new members.
* @property {string} guild A Discord guild ID as a foreign key reference. * @property {string} guild A Discord guild ID as a foreign key reference.
* @property {(model: Object) => void} hasMany Defines an One-To-Many relationship. * @property {(model: Object) => void} hasMany Defines an One-To-Many relationship.
* @property {(conditions: Object) => Promise<Role>} findOne Finds one instance in the database matching the provided condition(-s). * @property {(conditions: Object) => Promise<Role>} findOne Finds one instance in the database matching the provided condition(-s).
@ -20,6 +21,10 @@ export default function (sequelize) {
type: DataTypes.STRING, type: DataTypes.STRING,
primaryKey: true primaryKey: true
}, },
assign: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
guild: { guild: {
type: DataTypes.STRING, type: DataTypes.STRING,
references: { references: {