change 'account' field in Moderation model to 'username'
parent
0e13cfaf48
commit
38f48bb324
|
@ -1,23 +1,39 @@
|
||||||
import { Document, Schema, model } from 'mongoose';
|
import { Document, Schema, model } from 'mongoose';
|
||||||
|
import { ModerationInterface } from '.';
|
||||||
|
|
||||||
export interface ModerationInterface extends Document {
|
export interface ModerationInterface extends Document {
|
||||||
account: string,
|
username: string,
|
||||||
userID: string,
|
userID: string,
|
||||||
logID: string,
|
logID: string,
|
||||||
moderatorID: string,
|
moderatorID: string,
|
||||||
reason: 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({
|
const Moderation: Schema = new Schema({
|
||||||
account: String,
|
username: String,
|
||||||
userID: String,
|
userID: String,
|
||||||
logID: Number,
|
logID: Number,
|
||||||
moderatorID: String,
|
moderatorID: String,
|
||||||
reason: String,
|
reason: String,
|
||||||
type: String,
|
type: String,
|
||||||
date: Date,
|
date: Date,
|
||||||
|
expiration: {
|
||||||
|
date: Date,
|
||||||
|
processed: Boolean,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default model<ModerationInterface>('Moderation', Moderation);
|
export default model<ModerationInterface>('Moderation', Moderation);
|
||||||
|
|
Loading…
Reference in New Issue