-
Notifications
You must be signed in to change notification settings - Fork 0
/
classes.py
39 lines (36 loc) · 1.04 KB
/
classes.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
from pydantic import BaseModel, EmailStr
from typing import Optional, Dict, List
import uuid
from datetime import datetime
class User(BaseModel):
user_id: uuid.UUID = uuid.uuid4()
first_name: str
last_name: str
middle_name: Optional[str] = None
username: str
email: EmailStr
birthdate: str
gender: str
location: List[float]
profile_photo_url: Optional[str] = None
description: Optional[str] = None
last_online: datetime = datetime.now()
social_media_links: Optional[dict] = None
class Event(BaseModel):
event_id: uuid.UUID = uuid.uuid4()
activity_id: int
initiated_by: uuid.UUID
location: List[float]
address: Optional[str] = None
participant_min_age: int
participant_max_age: int
participant_pref_genders: List[str]
description: str
event_picture_url: Optional[str] = None
event_date_time: Optional[datetime] = None
class EventFilterCriteria(BaseModel):
activity_names: List[str]
pref_genders: List[str]
min_age: int
max_age: int
radius: float