cr-database/mongodb-models/Moderation.ts

38 lines
595 B
TypeScript

import { prop } from '@typegoose/typegoose';
export enum ModType {
Warn,
Unmute,
Mute,
Kick,
Unban,
Ban,
}
export default class Moderation {
@prop({ required: true })
public userID: string;
@prop({ required: true })
public logID: string;
@prop({ required: true })
public moderatorID: string;
@prop({ required: true })
public reason: string;
@prop({ required: true })
public date: Date;
@prop({ required: true })
public type: ModType;
@prop()
public expiration: {
date: Date;
processed: boolean;
}
}