We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4e6d0e commit b8a1908Copy full SHA for b8a1908
1 file changed
app/schemas.py
@@ -2,8 +2,6 @@
2
from pydantic import BaseModel, validator
3
from typing import Optional
4
5
-from models import Item
6
-
7
8
MAX_PRICE = 10000
9
@@ -21,6 +19,7 @@ def price_more_than_max(cls, value: float):
21
19
raise ValueError('payment sum is more than 10 000')
22
20
return value
23
+
24
class ItemResponseSchema(ItemRequestSchema):
25
id: int
26
@@ -41,15 +40,14 @@ def price_more_than_max(cls, value: float):
41
40
42
43
44
class PaymentRequestSchema(BaseModel):
45
item_id: Optional[int]
46
date: Optional[datetime]
47
status: Optional[str]
48
is_issued: Optional[bool]
49
50
51
52
53
class PaymentResponseSchema(PaymentRequestSchema):
54
55
0 commit comments