-
Notifications
You must be signed in to change notification settings - Fork 0
/
schemas.py
136 lines (98 loc) · 2.37 KB
/
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
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
131
132
133
134
135
136
from pydantic import BaseModel,EmailStr
from typing import List
from fastapi_jwt_auth import AuthJWT
from typing import Optional
class Posts(BaseModel):
title:str
body:str
class ShowPosts(BaseModel):
id:int
title:str
body:str
class Config():
orm_mode = True
class User(BaseModel):
username:str
first_name:str
last_name:str
email:EmailStr
phoneNumber:str
password1:str
password2:str
class ShowUser(BaseModel):
username: str
email:EmailStr
blogs:List
class Config():
orm_mode = True
class UserUpdate(BaseModel):
name:str
email:EmailStr
username:str
class Login(BaseModel):
username:str
password:str
class Settings(BaseModel):
authjwt_secret_key: str = "secret"
authjwt_token_location:set ={'cookies','headers'}
authjwt_access_cookie_key:str='access_token'
authjwt_refresh_cookie_key:str='refresh_token'
authjwt_cookie_csrf_protect: bool = False
authjwt_cookie_samesite:str ='lax'
@AuthJWT.load_config
def get_config():
return Settings()
class TokenData(BaseModel):
email: Optional[str] = None
class BankResponse(BaseModel):
bank_id:int
code:str
name:str
class Config():
orm_mode = True
class ValidateAccount(BaseModel):
Bank_code:str
account_number:int
class VerifyEmail(BaseModel):
token : str
class TransferFund(BaseModel):
amount:float
currencyCode :str
narration :str
beneficiaryAccountName:str
beneficiaryAccountNumber:str
beneficiaryBankCode: str
class KudaKey(BaseModel):
email:str
api_key: Optional[str] = None
class Bvnreq(BaseModel):
bvn:str
class InternalTransfer(BaseModel):
toUser:str
Amount: int
pin: int
reason:str
class SetPin(BaseModel):
pin1:int
pin2:int
class BuyData(BaseModel):
network_id:int
mobile_number:str
plan_id:int
class resetPassword(BaseModel):
username: Optional[str] = None
email:Optional[str] = None
class BanksResponse(BaseModel):
id:int
code:str
name:str
class Config():
orm_mode = True
class Dataplans(BaseModel):
plan_id:int
plan_price:float
network:str
size:str
validity:str
class Config():
orm_mode = True