-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest.go
34 lines (28 loc) · 893 Bytes
/
test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package kilonova
import (
"time"
"github.com/shopspring/decimal"
)
type Test struct {
ID int `json:"id"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
Score decimal.Decimal `json:"score"`
ProblemID int `db:"problem_id" json:"problem_id"`
VisibleID int `db:"visible_id" json:"visible_id"`
}
type TestUpdate struct {
Score *decimal.Decimal `json:"score"`
VisibleID *int `json:"visible_id"`
}
type SubTask struct {
ID int `json:"id"`
CreatedAt time.Time `json:"created_at"`
ProblemID int `json:"problem_id"`
VisibleID int `json:"visible_id"`
Score decimal.Decimal `json:"score"`
Tests []int `json:"tests"`
}
type SubTaskUpdate struct {
VisibleID *int `json:"visible_id"`
Score *decimal.Decimal `json:"score"`
}