change 'account' field in Moderation model to 'username'

merge-requests/1/merge
Matthew 2019-10-26 00:02:26 -04:00
parent 0e13cfaf48
commit 38f48bb324
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 20 additions and 4 deletions

View File

@ -1,23 +1,39 @@
import { Document, Schema, model } from 'mongoose';
import { ModerationInterface } from '.';
export interface ModerationInterface extends Document {
account: string,
username: string,
userID: string,
logID: string,
moderatorID: string,
reason: string,
type: string,
date: Date
/**
* @field 0 - Create
* @field 1 - Warn
* @field 2 - Lock
* @field 3 - Unlock
* @field 4 - Delete
*/
type: 0 | 1 | 2 | 3 | 4
date: Date,
expiration: {
date: Date,
processed: boolean
}
}
const Moderation: Schema = new Schema({
account: String,
username: String,
userID: String,
logID: Number,
moderatorID: String,
reason: String,
type: String,
date: Date,
expiration: {
date: Date,
processed: Boolean,
},
});
export default model<ModerationInterface>('Moderation', Moderation);