module.add(user,problem,record)

This commit is contained in:
masnn committed 2020-04-01 18:13:04 +08:00
commit d5b1f623f8
43 files changed
+5965

No files matched your search

+55
View File
@@ -0,0 +1,55 @@
export class User {
_id: number
email: string
emailLower: string
uname: string
unameLower: string
salt: string
hash: string
priv: number
domainId: string = 'system'
displayName: string = ''
nAccept: number = 0
nSubmit: number = 0
perm: string = '0'
constructor(user, domainUser) { }
hasPriv(priv) { }
hasPerm(perm) { }
checkPassword(password) { }
async joinDomain(role, joinAt) { }
}
export interface TestCase {
time: number,
memory: number,
status: number,
message: string
}
export interface Record {
_id: import('bson').ObjectID,
domainId: string,
pid: string | boolean,
creator: number,
lang: string,
code: string,
score: number,
memory: number,
time: number,
judgeTexts: string[],
compilerTexts: string[],
testCases: TestCase[],
judger: string,
judgeAt: Date,
status: number
}
export interface Problem {
_id: number | string,
domainId: string,
title: string,
content: string,
timeLimit: number,
memoryLimit: number,
nSubmit: number,
nAccept: number,
tags: string[],
categories: string[]
}