core: store record rejudge history

This commit is contained in:
undefined committed 2025-03-16 23:10:52 +00:00
1 parent 415d1f4ef1
commit 0e7320fed4
3 files changed
+35 -13

No files matched your search

+7 -1
View File
@@ -4,7 +4,7 @@ import type fs from 'fs';
import type { Dictionary, NumericDictionary } from 'lodash';
import type { Binary, FindCursor, ObjectId } from 'mongodb';
import type {
FileInfo, RecordPayload,
FileInfo, RecordJudgeInfo, RecordPayload,
} from '@hydrooj/common/types';
import type { Context } from './context';
import type { DocStatusType } from './model/document';
@@ -224,6 +224,11 @@ export type RecordDoc = {
_id: ObjectId;
};
export interface RecordHistoryDoc extends RecordJudgeInfo {
_id: ObjectId;
rid: ObjectId;
}
export interface RecordStatDoc {
_id: ObjectId;
domainId: string;
@@ -545,6 +550,7 @@ declare module './service/db' {
'domain.user': any;
'record': RecordDoc;
'record.stat': RecordStatDoc;
'record.history': RecordHistoryDoc;
'document': any;
'document.status': StatusDocBase & {
[K in keyof DocStatusType]: { docType: K } & DocStatusType[K];