core&ui: contest: add print (#1036)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda authored and GitHub committed 2025-08-17 05:02:45 +01:00
1 parent 1c7b2275ff
commit 720eb6b7e0
13 files changed
+419 -6

No files matched your search

+12
View File
@@ -8,6 +8,7 @@ import type {
FileInfo, RecordJudgeInfo, RecordPayload,
} from '@hydrooj/common/types';
import type { Context } from './context';
import type { PrintTaskStatus } from './model/contest';
import type { DocStatusType } from './model/document';
import type { OauthMap } from './model/oauth';
import type { ProblemDoc } from './model/problem';
@@ -264,6 +265,7 @@ export interface Tdoc extends Document {
assign?: string[];
files?: FileInfo[];
allowViewCode?: boolean;
allowPrint?: boolean;
// For contest
lockAt?: Date;
@@ -383,6 +385,16 @@ export interface ContestClarificationDoc extends Document {
reply: DiscussionTailReplyDoc[];
}
export interface ContestPrintDoc extends Document {
docType: document['TYPE_CONTEST_PRINT'];
docId: ObjectId;
parentType: document['TYPE_CONTEST'];
parentId: ObjectId;
title: string;
content: string;
status: PrintTaskStatus;
}
export interface TokenDoc {
_id: string;
tokenType: number;