add more info of AdminVocabularyAudit

This commit is contained in:
2026-05-27 08:29:50 +08:00
parent 0ec12aa0ca
commit 37e4837e3f
4 changed files with 1006 additions and 34 deletions

View File

@@ -58,6 +58,10 @@ export interface IVocabularyTestRecord extends Document {
}>;
invalidated?: boolean;
riskFlags?: string[];
reviewDecision?: 'approved';
reviewedBy?: mongoose.Types.ObjectId;
reviewedAt?: Date;
reviewNote?: string;
createdAt: Date;
}
@@ -92,6 +96,10 @@ export interface IVocabularyTestAttempt extends Document {
};
}>;
riskFlags?: string[];
reviewDecision?: 'approved';
reviewedBy?: mongoose.Types.ObjectId;
reviewedAt?: Date;
reviewNote?: string;
issuedAt: Date;
expiresAt: Date;
submittedAt?: Date;
@@ -178,6 +186,10 @@ const VocabularyTestRecordSchema = new Schema<IVocabularyTestRecord>({
}],
invalidated: { type: Boolean, default: false },
riskFlags: [{ type: String }],
reviewDecision: { type: String, enum: ['approved'] },
reviewedBy: { type: Schema.Types.ObjectId, ref: 'User' },
reviewedAt: Date,
reviewNote: { type: String, trim: true, maxlength: 500 },
createdAt: { type: Date, default: Date.now }
});
@@ -217,6 +229,10 @@ const VocabularyTestAttemptSchema = new Schema<IVocabularyTestAttempt>({
}
}],
riskFlags: [{ type: String }],
reviewDecision: { type: String, enum: ['approved'] },
reviewedBy: { type: Schema.Types.ObjectId, ref: 'User' },
reviewedAt: Date,
reviewNote: { type: String, trim: true, maxlength: 500 },
issuedAt: { type: Date, required: true },
expiresAt: { type: Date, required: true },
submittedAt: Date,