1 |
import { DataTypes, Model } from 'sequelize'; |
import { Schema, model } from 'mongoose'; |
|
import DiscordClient from '../client/Client'; |
|
|
import { Schema, model, Document, SchemaTypes } from 'mongoose'; |
|
|
|
|
|
// export interface IChannelLock extends Document { |
|
|
// user: string; |
|
|
// reason?: string; |
|
|
// mentions: Array<object>; |
|
|
// guild_id: string; |
|
|
// createdAt: Date; |
|
|
// } |
|
2 |
|
|
3 |
const schema = new Schema({ |
const schema = new Schema({ |
4 |
reason: { |
reason: { |
32 |
} |
} |
33 |
}); |
}); |
34 |
|
|
|
// class ChannelLock extends Model {} |
|
|
|
|
|
// ChannelLock.init({ |
|
|
// id: { |
|
|
// type: DataTypes.INTEGER, |
|
|
// autoIncrement: true, |
|
|
// primaryKey: true, |
|
|
// }, |
|
|
// reason: { |
|
|
// type: DataTypes.TEXT, |
|
|
// allowNull: true |
|
|
// }, |
|
|
// user_id: { |
|
|
// type: DataTypes.STRING, |
|
|
// allowNull: false |
|
|
// }, |
|
|
// guild_id: { |
|
|
// type: DataTypes.STRING, |
|
|
// allowNull: false |
|
|
// }, |
|
|
// channel_id: { |
|
|
// type: DataTypes.STRING, |
|
|
// unique: true, |
|
|
// allowNull: false |
|
|
// }, |
|
|
// role_id: { |
|
|
// type: DataTypes.STRING, |
|
|
// allowNull: false |
|
|
// }, |
|
|
// previous_perms: { |
|
|
// type: DataTypes.JSON, |
|
|
// allowNull: false |
|
|
// } |
|
|
// }, { |
|
|
// sequelize: DiscordClient.client.db.sequelize, |
|
|
// modelName: 'ChannelLock', |
|
|
// updatedAt: false, |
|
|
// tableName: 'channel_lock' |
|
|
// }); |
|
|
|
|
35 |
export default model('ChannelLock', schema); |
export default model('ChannelLock', schema); |