blob: 23fc336c52c2a9ad24b40dc4c5a8cb5b8f9377e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { Schema, model, Types, Document } from "mongoose";
import db from "../util/Database";
export interface Ban extends Document {
user_id: bigint;
guild_id: bigint;
ip: string;
reason?: string;
}
export const BanSchema = new Schema({
user_id: { type: Types.Long, required: true },
guild_id: { type: Types.Long, required: true },
reason: String,
ip: String, // ? Should we store this in here, or in the UserModel?
});
// @ts-ignore
export const BanModel = db.model<Ban>("Ban", BanSchema, "bans");
|