mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
添加部分注释,修复一些功能
This commit is contained in:
1 parent
f40e4e2c74
commit
d3e36fcb6c
32 files changed
+320
-174
No files matched your search
+42
-24
@@ -1,18 +1,33 @@
|
||||
export class User {
|
||||
import { ObjectID } from 'bson';
|
||||
|
||||
export interface Udoc {
|
||||
_id: number
|
||||
email: string
|
||||
emailLower: string
|
||||
mail: string
|
||||
mailLower: string
|
||||
uname: string
|
||||
unameLower: string
|
||||
salt: string
|
||||
hash: string
|
||||
displayName: string = ''
|
||||
nAccept: number = 0
|
||||
nSubmit: number = 0
|
||||
perm: string = '0'
|
||||
constructor(user) { }
|
||||
hasPerm(perm) { }
|
||||
checkPassword(password) { }
|
||||
hashType: string
|
||||
nAccept: number
|
||||
nSubmit: number
|
||||
nLike: number
|
||||
perm: string
|
||||
hasPerm: Function
|
||||
checkPassword: Function
|
||||
}
|
||||
export interface Pdoc {
|
||||
_id: ObjectID
|
||||
pid: string
|
||||
owner: number
|
||||
title: string
|
||||
content: string
|
||||
nSubmit: number
|
||||
nAccept: number
|
||||
tag: string[]
|
||||
category: string[],
|
||||
data: ObjectID | null
|
||||
hidden: boolean
|
||||
}
|
||||
export interface TestCase {
|
||||
time: number,
|
||||
@@ -20,10 +35,10 @@ export interface TestCase {
|
||||
status: number,
|
||||
message: string
|
||||
}
|
||||
export interface Record {
|
||||
_id: import('bson').ObjectID,
|
||||
pid: string | boolean,
|
||||
creator: number,
|
||||
export interface Rdoc {
|
||||
_id: ObjectID,
|
||||
pid: ObjectID,
|
||||
owner: number,
|
||||
lang: string,
|
||||
code: string,
|
||||
score: number,
|
||||
@@ -32,18 +47,21 @@ export interface Record {
|
||||
judgeTexts: string[],
|
||||
compilerTexts: string[],
|
||||
testCases: TestCase[],
|
||||
rejudged: boolean,
|
||||
judger: string,
|
||||
judgeAt: Date,
|
||||
status: number
|
||||
}
|
||||
export interface Problem {
|
||||
_id: number | string,
|
||||
title: string,
|
||||
content: string,
|
||||
timeLimit: number,
|
||||
memoryLimit: number,
|
||||
nSubmit: number,
|
||||
nAccept: number,
|
||||
tags: string[],
|
||||
categories: string[]
|
||||
export interface Bdoc {
|
||||
_id: string,
|
||||
expireAt: Date
|
||||
}
|
||||
export interface Tdoc {
|
||||
_id: ObjectID
|
||||
beginAt: Date
|
||||
endAt: Date
|
||||
attend: number
|
||||
title: string
|
||||
content: string
|
||||
pids: ObjectID[]
|
||||
}
|
||||
Reference in new issue
Block a user