add contest detail.
This commit is contained in:
@@ -14,6 +14,17 @@ export enum SubmissionStatus {
|
||||
submitting = 9,
|
||||
}
|
||||
|
||||
export enum ContestStatus {
|
||||
not_started = "1",
|
||||
underway = "0",
|
||||
finished = "-1",
|
||||
}
|
||||
|
||||
export enum ContestType {
|
||||
public = "Public",
|
||||
private = "Password Protected",
|
||||
}
|
||||
|
||||
export const JUDGE_STATUS: {
|
||||
[key in SUBMISSION_RESULT]: {
|
||||
name: string
|
||||
@@ -71,7 +82,7 @@ export const JUDGE_STATUS: {
|
||||
}
|
||||
|
||||
export const CONTEST_STATUS: {
|
||||
[key in "1" | "-1" | "0"]: {
|
||||
[key in ContestStatus]: {
|
||||
name: string
|
||||
type: "error" | "success" | "warning"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { ContestStatus, ContestType } from "./constants"
|
||||
|
||||
export interface Profile {
|
||||
id: number
|
||||
user: User
|
||||
@@ -206,8 +208,8 @@ export interface Contest {
|
||||
username: string
|
||||
real_name: null
|
||||
}
|
||||
status: "-1" | "0" | "1"
|
||||
contest_type: "Password Protected" | "Public"
|
||||
status: ContestStatus
|
||||
contest_type: ContestType
|
||||
title: string
|
||||
description: string
|
||||
real_time_rank: boolean
|
||||
|
||||
Reference in New Issue
Block a user