xync-schema 0.6.56__tar.gz → 0.6.58__tar.gz
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-0.6.56/xync_schema.egg-info → xync_schema-0.6.58}/PKG-INFO +1 -1
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema/models.py +2 -1
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema/pydantic.py +8 -3
- {xync_schema-0.6.56 → xync_schema-0.6.58/xync_schema.egg-info}/PKG-INFO +1 -1
- {xync_schema-0.6.56 → xync_schema-0.6.58}/.env.sample +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/.gitignore +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/README.md +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/makefile +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/pyproject.toml +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/setup.cfg +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/tests/__init__.py +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/tests/test_db.py +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema/enums.py +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.56 → xync_schema-0.6.58}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -449,8 +449,9 @@ 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
|
-
receiver: fields.ForeignKeyRelation[Agent] = fields.ForeignKeyField("models.
|
|
454
|
+
receiver: fields.ForeignKeyRelation[Agent] = fields.ForeignKeyField("models.Agent", related_name="msgs")
|
|
454
455
|
order: fields.ForeignKeyRelation[Order] = fields.ForeignKeyField("models.Order", related_name="msgs")
|
|
455
456
|
|
|
456
457
|
class PydanticMeta(Model.PydanticMeta):
|
|
@@ -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,9 @@ 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
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class UreadMsgs(BaseModel):
|
|
38
|
+
receiver__user_id: int
|
|
39
|
+
unread_cnt: int
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|