[rewrite] Updated backend structure a bit and started working on registration
This commit is contained in:
1 parent
f0c378b20f
commit
5d12391635
17 files changed
+832
-86
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,13 @@
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
|
||||
|
||||
class UserRegisterSchema(BaseModel):
|
||||
username: str = Field(..., min_length=3, max_length=64)
|
||||
email: EmailStr = Field(...)
|
||||
phone_number: str = Field(..., min_length=10, max_length=15, pattern=r'^\+[0-9]{1,3} [0-9]{1,9}$')
|
||||
password: str = Field(..., min_length=6, max_length=128)
|
||||
shop_id: Optional[int] = None
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
Reference in new issue
Block a user