1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- from pydantic import BaseModel
- from typing import List, Optional
- SECRET_KEY = "df2f77bd544240801a048bd4293afd8eeb7fff3cb7050e42c791db4b83ebadcd"
- ALGORITHM = "HS256"
- class Token(BaseModel):
- access_token: str
- token_type: str
- class swap_req(BaseModel):
- imgurl: str
- class request(BaseModel):
- name: str
- text_content: List[str]
- image_urls: List[str]
- avatar: str
- client_id :str
- multiLang :int
- class request_normal():
- name: str
- text_content: List[str]
- image_urls: List[str]
- avatar: str
- client_id :str
- multiLang :int
- class gSlide_req(BaseModel):
- slide_url: str
- avatar: str
- client_id :str
- multiLang :int
- url_type: int
- class request_eng(BaseModel):
- name: str
- text_content: List[str]
- image_urls: List[str]
- sub_titles: List[str]
- avatar: str
- client_id :str
- # AuthJWT setting
- class Settings(BaseModel):
- authjwt_secret_key: str = SECRET_KEY
- authjwt_token_location: set = {"cookies"}
- authjwt_cookie_secure: bool = False
- authjwt_cookie_csrf_protect: bool = True
- class User(BaseModel):
- username: str
- email: str
- password: str
- token: Optional[str] = None
-
- class TokenData(BaseModel):
- username: Optional[str] = None
- class phone(BaseModel):
- price: int
- class register_req(BaseModel):
- username: str
- email: str
- password: str
|