xync-schema 0.6.79__tar.gz → 0.6.81__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.79/xync_schema.egg-info → xync_schema-0.6.81}/PKG-INFO +1 -1
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema/models.py +3 -3
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema/types.py +5 -9
- {xync_schema-0.6.79 → xync_schema-0.6.81/xync_schema.egg-info}/PKG-INFO +1 -1
- {xync_schema-0.6.79 → xync_schema-0.6.81}/.env.sample +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/.gitignore +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/README.md +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/makefile +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/pyproject.toml +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/setup.cfg +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/tests/__init__.py +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/tests/test_db.py +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema/enums.py +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.79 → xync_schema-0.6.81}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -93,11 +93,11 @@ class Ex(Model):
|
|
|
93
93
|
class PydanticMeta(Model.PydanticMeta):
|
|
94
94
|
include = "name", "logo"
|
|
95
95
|
|
|
96
|
-
def client(self):
|
|
96
|
+
def client(self, actor: "Actor" = None):
|
|
97
97
|
module_name = f"xync_client.{self.name}.ex"
|
|
98
98
|
__import__(module_name)
|
|
99
99
|
client = sys.modules[module_name].ExClient
|
|
100
|
-
return client(self)
|
|
100
|
+
return client(self, actor=actor)
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
class Curex(BaseModel):
|
|
@@ -246,7 +246,7 @@ class Actor(Model):
|
|
|
246
246
|
person_id: int
|
|
247
247
|
|
|
248
248
|
agent: fields.BackwardOneToOneRelation["Agent"]
|
|
249
|
-
|
|
249
|
+
my_ads: fields.BackwardFKRelation["Ad"]
|
|
250
250
|
taken_orders: fields.BackwardFKRelation["Order"]
|
|
251
251
|
|
|
252
252
|
def client(self):
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from pydantic import BaseModel
|
|
2
|
+
from pydantic import BaseModel
|
|
3
3
|
|
|
4
4
|
from xync_schema.enums import AdStatus, OrderStatus
|
|
5
5
|
from xync_schema import models
|
|
@@ -36,18 +36,18 @@ class PmexBank(BaseModel):
|
|
|
36
36
|
|
|
37
37
|
class BaseAd(BaseModel):
|
|
38
38
|
price: float
|
|
39
|
-
|
|
39
|
+
id: int | None = None
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
class BaseAdIn(BaseAd):
|
|
43
43
|
min_fiat: float
|
|
44
44
|
max_fiat: float
|
|
45
|
-
|
|
45
|
+
direction_id: int
|
|
46
46
|
detail: str | None = None
|
|
47
47
|
auto_msg: str | None = None
|
|
48
48
|
status: AdStatus = AdStatus.active
|
|
49
|
-
|
|
50
|
-
_unq = "exid", "
|
|
49
|
+
maker_id: int = None
|
|
50
|
+
_unq = "exid", "maker_id", "direction_id"
|
|
51
51
|
|
|
52
52
|
class Config:
|
|
53
53
|
arbitrary_types_allowed = True
|
|
@@ -61,10 +61,6 @@ class AdSaleIn(BaseAdIn):
|
|
|
61
61
|
creds_: list[models.Cred]
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
class BaseOrder(BaseModel):
|
|
65
|
-
id: int | None = None
|
|
66
|
-
|
|
67
|
-
|
|
68
64
|
class OrderIn(BaseModel):
|
|
69
65
|
exid: int
|
|
70
66
|
amount: float
|
|
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
|