2 |
import DiscordClient from '../client/Client'; |
import DiscordClient from '../client/Client'; |
3 |
import { Schema, model, Document, SchemaTypes } from 'mongoose'; |
import { Schema, model, Document, SchemaTypes } from 'mongoose'; |
4 |
|
|
|
// export interface IChannelLock extends Document { |
|
|
// user: string; |
|
|
// reason?: string; |
|
|
// mentions: Array<object>; |
|
|
// guild_id: string; |
|
|
// createdAt: Date; |
|
|
// } |
|
|
|
|
5 |
const schema = new Schema({ |
const schema = new Schema({ |
6 |
reason: { |
reason: { |
7 |
type: String, |
type: String, |
34 |
} |
} |
35 |
}); |
}); |
36 |
|
|
|
// 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' |
|
|
// }); |
|
|
|
|
37 |
export default model('ChannelLock', schema); |
export default model('ChannelLock', schema); |