-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.py
66 lines (56 loc) · 1.39 KB
/
model.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from __future__ import annotations
from typing import Sequence
from pydantic import BaseModel, ConfigDict
class Stat(BaseModel):
model_config = ConfigDict(
extra="allow",
populate_by_name=True,
frozen=True,
)
question_id: int
question__article__live: bool | None = None
question__article__slug: str | None = None
question__article__has_video_solution: bool | None = None
question__title: str
question__title_slug: str
question__hide: bool
total_acs: int
total_submitted: int
frontend_question_id: int
is_new_question: bool
class Difficulty(BaseModel):
model_config = ConfigDict(
extra="allow",
populate_by_name=True,
frozen=True,
)
level: int
class StatStatusPair(BaseModel):
model_config = ConfigDict(
extra="allow",
populate_by_name=True,
frozen=True,
)
stat: Stat
status: str | None = None
difficulty: Difficulty
paid_only: bool
is_favor: bool
frequency: int
progress: int
class Model(BaseModel):
model_config = ConfigDict(
extra="allow",
populate_by_name=True,
frozen=True,
)
user_name: str
num_solved: int
num_total: int
ac_easy: int
ac_medium: int
ac_hard: int
stat_status_pairs: Sequence[StatStatusPair]
frequency_high: int
frequency_mid: int
category_slug: str