-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschemas.py
49 lines (35 loc) · 983 Bytes
/
schemas.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
from enum import Enum
from typing import List
from pydantic import BaseModel
class ReceiptStatus(str, Enum):
OPEN: str = "open"
UNSHIPPED: str = "unshipped"
UNPAID: str = "unpaid"
COMPLETED: str = "completed"
PROCESSING: str = "processing"
ALL: str = "all"
class NoteUpdate(BaseModel):
note: str
class NoteData(BaseModel):
receipt_id: str
note: str
class UserData(BaseModel):
"""
user = Username (username1, username2 etc.)
user_id = User_id (60cd51a2a44682438f29307e etc.)
scopes= scopes (admin, guest etc.)
"""
user: str
user_id: str
scopes: List[str]
# class InvitationDetails(BaseModel):
# email: EmailStr
# class RegisterDetails(BaseModel):
# email: EmailStr
# username: str
# password: str
# verification_code: str
# class AuthDetails(BaseModel):
# email: EmailStr
# username: str
# password: str