xync-schema 0.6.55__py3-none-any.whl → 0.6.57__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xync_schema/models.py +6 -0
- xync_schema/pydantic.py +3 -3
- {xync_schema-0.6.55.dist-info → xync_schema-0.6.57.dist-info}/METADATA +1 -1
- xync_schema-0.6.57.dist-info/RECORD +8 -0
- xync_schema-0.6.55.dist-info/RECORD +0 -8
- {xync_schema-0.6.55.dist-info → xync_schema-0.6.57.dist-info}/WHEEL +0 -0
- {xync_schema-0.6.55.dist-info → xync_schema-0.6.57.dist-info}/top_level.txt +0 -0
xync_schema/models.py
CHANGED
|
@@ -449,10 +449,16 @@ class Order(Model):
|
|
|
449
449
|
class Msg(Model):
|
|
450
450
|
tgid: int = fields.IntField()
|
|
451
451
|
txt: str = fields.CharField(255)
|
|
452
|
+
read: bool = fields.BooleanField(default=False)
|
|
452
453
|
media: str | None = fields.CharField(255, null=True)
|
|
453
454
|
receiver: fields.ForeignKeyRelation[Agent] = fields.ForeignKeyField("models.User", related_name="msgs")
|
|
454
455
|
order: fields.ForeignKeyRelation[Order] = fields.ForeignKeyField("models.Order", related_name="msgs")
|
|
455
456
|
|
|
457
|
+
class PydanticMeta(Model.PydanticMeta):
|
|
458
|
+
max_recursion: int = 0
|
|
459
|
+
exclude_raw_fields: bool = False
|
|
460
|
+
exclude = ("receiver", "order")
|
|
461
|
+
|
|
456
462
|
|
|
457
463
|
# class Dep(Model, TsTrait):
|
|
458
464
|
# pid: str = fields.CharField(31) # product_id
|
xync_schema/pydantic.py
CHANGED
|
@@ -2,7 +2,7 @@ from datetime import datetime
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
|
|
5
|
-
from xync_schema.models import Fiat
|
|
5
|
+
from xync_schema.models import Fiat
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class FiatUpd(BaseModel):
|
|
@@ -23,7 +23,7 @@ class OrderPyd(BaseModel):
|
|
|
23
23
|
id: int
|
|
24
24
|
amount: float
|
|
25
25
|
status: str
|
|
26
|
-
actions: dict | None =
|
|
26
|
+
actions: dict | None = {}
|
|
27
27
|
fiat: Fiat.pyd()
|
|
28
28
|
is_sell: bool
|
|
29
29
|
contragent: int | None = None
|
|
@@ -31,4 +31,4 @@ class OrderPyd(BaseModel):
|
|
|
31
31
|
payed_at: datetime | None = None
|
|
32
32
|
appealed_at: datetime | None = None
|
|
33
33
|
confirmed_at: datetime | None = None
|
|
34
|
-
msgs:
|
|
34
|
+
msgs: int = 0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
xync_schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
xync_schema/enums.py,sha256=la85coRbxXL0HiAgJYpOU4Yyf_atVp6DZSlAV3ICvEk,12207
|
|
3
|
+
xync_schema/models.py,sha256=BUnsBzbvnwIs0bQG7_8attHVwTqi6K0YS6zQd7OQnus,22221
|
|
4
|
+
xync_schema/pydantic.py,sha256=nQ0-vruPyOlpzDNEJr96qkeON24K4HW49ZU7IxR53Jg,681
|
|
5
|
+
xync_schema-0.6.57.dist-info/METADATA,sha256=3f1F2y4FTXhyBJHDKqiWleBQt3ZdCg_IHMQagj5HMis,3985
|
|
6
|
+
xync_schema-0.6.57.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
7
|
+
xync_schema-0.6.57.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
|
|
8
|
+
xync_schema-0.6.57.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
xync_schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
xync_schema/enums.py,sha256=la85coRbxXL0HiAgJYpOU4Yyf_atVp6DZSlAV3ICvEk,12207
|
|
3
|
-
xync_schema/models.py,sha256=9m2_Xgw34o27kD2ZRt63cBsPI0O3auy1l_29zNJibSU,22012
|
|
4
|
-
xync_schema/pydantic.py,sha256=-tOgIhjwGvp77c3Y5fRWrgt21LXwFUsPg1xE8ucb9G4,701
|
|
5
|
-
xync_schema-0.6.55.dist-info/METADATA,sha256=qhWd4tVXtTqXpIYBEIxiQe8NKyBz9L7ANe0s4IWJYN8,3985
|
|
6
|
-
xync_schema-0.6.55.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
7
|
-
xync_schema-0.6.55.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
|
|
8
|
-
xync_schema-0.6.55.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|