-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmodels.py
More file actions
130 lines (112 loc) · 3.66 KB
/
models.py
File metadata and controls
130 lines (112 loc) · 3.66 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
from typing import List, Optional
from uuid import UUID, uuid4
from pydantic import BaseModel, Field
from fastapi import UploadFile, File
class CheckInUpdate(BaseModel):
isChecked: bool
class StaffModel(BaseModel):
fullname: str
email: str
password: str
role: str
class StaffUpdate(BaseModel):
fullname: str | None = None
email: str | None = None
password: str | None = None
role: str | None = None
class StaffLogin(BaseModel):
email: str
password: str
class RegistrationInquiry(BaseModel):
id: UUID = Field(
str(uuid4()),title="ID", description="Unique identifier for the registration inquiry",
)
fullName: str = Field(
..., title="First Name", description="First name of the person registering"
)
email: str = Field(
..., title="Email", description="Email address of the person registering"
)
phone: str = Field(
"90000000", title="Phone", description="Phone number of the person registering"
)
organization: str = Field(
None, title="Last Name", description="Last name of the person registering"
)
country: str = Field(
"Togo",
title="Country/City",
description="Country or city of the person registering",
)
tshirtsize: str = Field(
None, title="T-shirt Size", description="T-shirt size of the person registering"
)
dietaryrestrictions: str = Field(
None, title="Message", description="Message from the registrant"
)
newsletter: bool = Field(
True, title="Newsletter", description="Subscribe to the newsletter"
)
codeofconduct: bool = Field(
True, title="Code of Conduct", description="Agree to the code of conduct"
)
checked: bool = Field(
False, title="Checked", description="Whether the registration is checked"
)
class DeleteModel(BaseModel):
id: int = Field(
..., title="ID", description="Unique identifier for the entry to be deleted"
)
table: str = Field(
..., title="Table", description="Name of the table from which to delete the entry"
)
class ProposalReviewModel(BaseModel):
reviewer_id: int = Field(..., title="REVIEWER_ID")
reviewer: str = Field(..., title="Reviewer Fullname")
proposal_id: int = Field(..., title="Proposal ID")
rate: int = Field(..., title="Rate")
comment: str = Field(..., title="Comment")
class UpdateSpeakerModel(BaseModel):
fullname: Optional[str] = None
bio: Optional[str] = None
short_bio: Optional[str] = None
title: Optional[str] = None
talk_abstract: Optional[str] = None
company: Optional[str] = None
country: Optional[str] = None
social_link: Optional[str] = None
social_platform: Optional[str] = None
photo_url: Optional[str] = None
banner_url: Optional[str] = None
format: Optional[str] = None
level: Optional[str] = None
status: Optional[str] = None
class FeedbackModel(BaseModel):
sex: str
age: str
profession: str
heard: str
overall: str
favorite: str
country: str
python_level: str
improvements: Optional[str] = None
comments: Optional[str] = None
rating: Optional[int] = None
class TalentModel(BaseModel):
last_name: str
first_name: str
email: str
track: str
cv_link: str
github_link: str
class StaffFeedbackModel(BaseModel):
reproach_chair: Optional[str] = None
reproach_cochair: Optional[str] = None
reproach_team: Optional[str] = None
reproach_team_target: Optional[str] = None
specific_person_remarks: Optional[List[dict]] = []
positive_chair: str
positive_cochair: str
positive_team: str
general_remarks: Optional[str] = None