-
Notifications
You must be signed in to change notification settings - Fork 0
/
bodyTypes.py
48 lines (40 loc) · 889 Bytes
/
bodyTypes.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
from pydantic import BaseModel
from fastapi import UploadFile
from datetime import date
from typing import Optional
class History(BaseModel):
songID: str
duration:str|int
class User(BaseModel):
userName: str
email: str
class UserProfile(BaseModel):
profile: bytes|None=None
dob: date|None=None
userName: str|None=None
email: str|None=None
userID: int
class Podcast(BaseModel):
name: str
duration: int
userID: int
image: bytes|None
audio: bytes
class Playlist(BaseModel):
name:str
image_blob:bytes|None
owner_id:int
class PlaylistTrack(BaseModel):
userID: int
playlistID: int
trackID: int
class DeleteMedia(BaseModel):
mediaType:str
mediaID:int
userID:int
class RecentTrack(BaseModel):
songID:int
userID:int
class OPlaylist(BaseModel):
userID:int
playlistID:int