MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / ProblemModel

Class ProblemModel

packages/hydrooj/src/model/problem.ts:83–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81];
82
83export class ProblemModel {
84 static PROJECTION_CONTEST_LIST: Field[] = [
85 ...PROJECTION_BASE, 'config',
86 ];
87
88 static PROJECTION_LIST: Field[] = [
89 ...PROJECTION_BASE,
90 'nSubmit', 'nAccept', 'difficulty', 'tag', 'hidden',
91 'stats',
92 ];
93
94 static PROJECTION_CONTEST_DETAIL: Field[] = [
95 ...ProblemModel.PROJECTION_CONTEST_LIST,
96 'content', 'html', 'data', 'additional_file',
97 'reference', 'maintainer',
98 ];
99
100 static PROJECTION_PUBLIC: Field[] = [
101 ...ProblemModel.PROJECTION_LIST,
102 'content', 'html', 'data', 'config', 'additional_file',
103 'reference', 'maintainer',
104 ];
105
106 static default = {
107 _id: new ObjectId(),
108 domainId: 'system',
109 docType: document.TYPE_PROBLEM,
110 docId: 0,
111 pid: '',
112 owner: 1,
113 title: '*',
114 content: '',
115 html: false,
116 nSubmit: 0,
117 nAccept: 0,
118 tag: [],
119 data: [],
120 additional_file: [],
121 stats: {},
122 hidden: true,
123 config: '',
124 difficulty: 0,
125 };
126
127 static deleted = {
128 _id: new ObjectId(),
129 domainId: 'system',
130 docType: document.TYPE_PROBLEM,
131 docId: -1,
132 pid: null,
133 owner: 1,
134 title: '*',
135 content: 'Deleted Problem',
136 html: false,
137 nSubmit: 0,
138 nAccept: 0,
139 tag: [],
140 data: [],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected