|
|
@ -13,7 +13,7 @@ const REPORT_CATEGORY_LIST = ['spam','violence','threat','porn','doxxing','other |
|
|
|
const ContentReportSchema = new Schema({ |
|
|
|
created: { type: Date, default: Date.now, required: true, index: 1, expires: '30d' }, |
|
|
|
user: { type: Schema.ObjectId, required: true, index: 1, ref: 'User' }, |
|
|
|
resourceType: { type: String, enum: [ ], required: true }, |
|
|
|
resourceType: { type: String, enum: ['Comment', 'ChatMessage'], required: true }, |
|
|
|
resource: { type: Schema.ObjectId, required: true, index: 1, refPath: 'resourceType' }, |
|
|
|
status: { type: String, enum: REPORT_STATUS_LIST, required: true, index: 1 }, |
|
|
|
category: { type: String, enum: REPORT_CATEGORY_LIST, required: true }, |
|
|
|