feat: extend problem fields
This commit is contained in:
parent
3ed195bb58
commit
6dc8f05675
14 changed files with 70 additions and 362 deletions
|
@ -1,8 +1,12 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Participant struct {
|
||||
Id *int32 `db:"id"`
|
||||
UserId *int32 `db:"user_id"`
|
||||
ContestId *int32 `db:"contest_id"`
|
||||
Name *string `db:"name"`
|
||||
Id *int32 `db:"id"`
|
||||
UserId *int32 `db:"user_id"`
|
||||
ContestId *int32 `db:"contest_id"`
|
||||
Name *string `db:"name"`
|
||||
CreatedAt *time.Time `db:"created_at"`
|
||||
UpdatedAt *time.Time `db:"updated_at"`
|
||||
}
|
||||
|
|
|
@ -3,13 +3,16 @@ package models
|
|||
import "time"
|
||||
|
||||
type Problem struct {
|
||||
Id *int32 `db:"id"`
|
||||
Title *string `db:"title"`
|
||||
Content *string `db:"content"`
|
||||
TimeLimit *int32 `db:"time_limit"`
|
||||
MemoryLimit *int32 `db:"memory_limit"`
|
||||
TestingStrategy *int32 `db:"testing_strategy"`
|
||||
TestingOrder *string `db:"testing_order"`
|
||||
CreatedAt *time.Time `db:"created_at"`
|
||||
UpdatedAt *time.Time `db:"updated_at"`
|
||||
Id *int32 `db:"id"`
|
||||
Title *string `db:"title"`
|
||||
Legend *string `db:"legend"`
|
||||
InputFormat *string `db:"input_format"`
|
||||
OutputFormat *string `db:"output_format"`
|
||||
Notes *string `db:"notes"`
|
||||
Tutorial *string `db:"tutorial"`
|
||||
LatexSummary *string `db:"latex_summary"`
|
||||
TimeLimit *int32 `db:"time_limit"`
|
||||
MemoryLimit *int32 `db:"memory_limit"`
|
||||
CreatedAt *time.Time `db:"created_at"`
|
||||
UpdatedAt *time.Time `db:"updated_at"`
|
||||
}
|
||||
|
|
|
@ -4,11 +4,12 @@ import "time"
|
|||
|
||||
type Solution struct {
|
||||
Id *int32 `db:"id"`
|
||||
ParticipantId *int32 `db:"participant_id"`
|
||||
TaskId *int32 `db:"task_id"`
|
||||
LanguageId *int32 `db:"language_id"`
|
||||
SolutionHash *string `db:"solution_hash"`
|
||||
Result *int32 `db:"result"`
|
||||
ParticipantId *int32 `db:"participant_id"`
|
||||
State *int32 `db:"state"`
|
||||
Score *int32 `db:"score"`
|
||||
Penalty *int32 `db:"penalty"`
|
||||
TotalScore *int32 `db:"total_score"`
|
||||
Language *int32 `db:"language"`
|
||||
CreatedAt *time.Time `db:"created_at"`
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Task struct {
|
||||
Id *int32 `db:"id"`
|
||||
ContestId *int32 `db:"contest_id"`
|
||||
ProblemId *int32 `db:"problem_id"`
|
||||
Position *int32 `db:"position"`
|
||||
PositionName *string `db:"position_name"`
|
||||
Id *int32 `db:"id"`
|
||||
ProblemId *int32 `db:"problem_id"`
|
||||
ContestId *int32 `db:"contest_id"`
|
||||
Position *int32 `db:"position"`
|
||||
CreatedAt *time.Time `db:"created_at"`
|
||||
UpdatedAt *time.Time `db:"updated_at"`
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
UserId *int32 `json:"user_id" db:"user_id"`
|
||||
Role *Role `json:"role" db:"role"`
|
||||
UpdatedAt *time.Time `json:"updated_at" db:"updated_at"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue