-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.py
More file actions
44 lines (32 loc) · 750 Bytes
/
model.py
File metadata and controls
44 lines (32 loc) · 750 Bytes
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
from datetime import datetime
from pydantic import BaseModel
class UserBase(BaseModel):
id_auteur: str
nom: str
class Challenge(BaseModel):
id_challenge: str
url_challenge: str
class ChallengeInfo(BaseModel):
titre: str
rubrique: str
soustitre: str
score: str
id_rubrique: str
url_challenge: str
date_publication: str
difficulte: str
auteurs: list[UserBase]
validations: int
class Solution(BaseModel):
id_solution: str
url_solution: str
class Validation(BaseModel):
id_challenge: str
date: datetime
class User(UserBase):
statut: str
score: str
position: int
challenges: list[Challenge]
solutions: list[Solution]
validations: list[Validation]