Initial commit

This commit is contained in:
2026-09-04 20:55:42 +03:00
commit 34d40fc219
52 changed files with 3967 additions and 0 deletions
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16
View File
@@ -0,0 +1,16 @@
from pydantic import BaseModel
from typing import List
class OrderItem(BaseModel):
name: str
quantity: int
price: float
class OrderResponse(BaseModel):
id: str
client_name: str
client_phone: str
ttn: str
cod_amount: float
fiscal_status: str
items: List[OrderItem] = []
+29
View File
@@ -0,0 +1,29 @@
import enum
from pydantic import BaseModel, EmailStr
from typing import Optional
class UserRole(str, enum.Enum):
admin = "admin"
cashier = "cashier"
class UserCreate(BaseModel):
email: EmailStr
password: str
role: UserRole = UserRole.cashier
class UserResponse(BaseModel):
id: int
email: EmailStr
is_active: bool
role: UserRole
class Config:
from_attributes = True
class Token(BaseModel):
access_token: str
token_type: str
class TokenData(BaseModel):
email: Optional[str] = None
role: Optional[str] = None