cr-database/mongodb-models/Moderation.ts

38 lines
595 B
TypeScript
Raw Normal View History

2022-02-28 11:51:44 -05:00
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;
}
}