xync-schema 0.6.78__tar.gz → 0.6.79__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.78/xync_schema.egg-info → xync_schema-0.6.79}/PKG-INFO +1 -1
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema/enums.py +4 -4
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema/models.py +22 -22
- {xync_schema-0.6.78 → xync_schema-0.6.79/xync_schema.egg-info}/PKG-INFO +1 -1
- {xync_schema-0.6.78 → xync_schema-0.6.79}/.env.sample +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/.gitignore +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/README.md +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/makefile +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/pyproject.toml +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/setup.cfg +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/tests/__init__.py +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/tests/test_db.py +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema/types.py +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.78 → xync_schema-0.6.79}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -144,10 +144,10 @@ class ExAction(IntEnum):
|
|
|
144
144
|
set_pairs = 46 # обновление пар биржи в бд
|
|
145
145
|
ad = 42 # Чужая объява по id
|
|
146
146
|
""" Agent: Fiat """
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
my_creds = 25 # Список реквизитов моих платежных методов
|
|
148
|
+
cred_new = 26 # Создание реквизита моего платежного метода
|
|
149
|
+
cred_upd = 27 # Редактирование реквизита моего платежного метода
|
|
150
|
+
cred_del = 28 # Удаление реквизита моего платежного метода
|
|
151
151
|
""" Agent: Ad """
|
|
152
152
|
my_ads = 29 # Список моих объявлений
|
|
153
153
|
my_ad = 43 # Моя объява по id
|
|
@@ -249,6 +249,26 @@ class Actor(Model):
|
|
|
249
249
|
ads: fields.BackwardFKRelation["Ad"]
|
|
250
250
|
taken_orders: fields.BackwardFKRelation["Order"]
|
|
251
251
|
|
|
252
|
+
def client(self):
|
|
253
|
+
module_name = f"xync_client.{self.ex.name}.agent"
|
|
254
|
+
__import__(module_name)
|
|
255
|
+
client = sys.modules[module_name].AgentClient
|
|
256
|
+
return client(self, headers=self.agent.auth.get("headers"), cookies=self.agent.auth.get("cookies"))
|
|
257
|
+
|
|
258
|
+
def in_client(self):
|
|
259
|
+
import sys
|
|
260
|
+
|
|
261
|
+
module_name = f"xync_client.{self.ex.name}.inAgent"
|
|
262
|
+
__import__(module_name)
|
|
263
|
+
client = sys.modules[module_name].InAgentClient
|
|
264
|
+
return client(self)
|
|
265
|
+
|
|
266
|
+
def asset_client(self):
|
|
267
|
+
module_name = f"xync_client.{self.ex.name}.asset"
|
|
268
|
+
__import__(module_name)
|
|
269
|
+
client = sys.modules[module_name].AssetClient
|
|
270
|
+
return client(self)
|
|
271
|
+
|
|
252
272
|
class Meta:
|
|
253
273
|
table_description = "Actors"
|
|
254
274
|
unique_together = (("ex_id", "exid"), ("ex_id", "person_id"))
|
|
@@ -266,26 +286,6 @@ class Agent(Model, TsTrait):
|
|
|
266
286
|
# def balance(self) -> int:
|
|
267
287
|
# return sum(asset.free * (asset.coin.rate or 0) for asset in self.assets)
|
|
268
288
|
|
|
269
|
-
def client(self):
|
|
270
|
-
module_name = f"xync_client.{self.actor.ex.name}.agent"
|
|
271
|
-
__import__(module_name)
|
|
272
|
-
client = sys.modules[module_name].AgentClient
|
|
273
|
-
return client(self, headers=self.auth.get("headers"), cookies=self.auth.get("cookies"))
|
|
274
|
-
|
|
275
|
-
# def in_client(self) -> "BaseInAgentClient":
|
|
276
|
-
# import sys
|
|
277
|
-
#
|
|
278
|
-
# module_name = f"xync_client.{self.ex.name}.inAgent"
|
|
279
|
-
# __import__(module_name)
|
|
280
|
-
# client = sys.modules[module_name].InAgentClient
|
|
281
|
-
# return client(self)
|
|
282
|
-
|
|
283
|
-
def asset_client(self):
|
|
284
|
-
module_name = f"xync_client.{self.actor.ex.name}.asset"
|
|
285
|
-
__import__(module_name)
|
|
286
|
-
client = sys.modules[module_name].AssetClient
|
|
287
|
-
return client(self)
|
|
288
|
-
|
|
289
289
|
# class PydanticMeta(Model.PydanticMeta):
|
|
290
290
|
# max_recursion = 3
|
|
291
291
|
# include = "id", "actor__ex", "auth", "updated_at"
|
|
@@ -665,10 +665,10 @@ class TestEx(Model):
|
|
|
665
665
|
updated_at: datetime | None = DatetimeSecField(auto_now=True)
|
|
666
666
|
|
|
667
667
|
_icon = "test-pipe"
|
|
668
|
-
_name = {"
|
|
668
|
+
_name = {"ex_id", "action", "ok"}
|
|
669
669
|
|
|
670
670
|
def repr(self, *args):
|
|
671
|
-
return f"{self.
|
|
671
|
+
return f"{self.ex_id} {self.action.name} {self.ok}"
|
|
672
672
|
|
|
673
673
|
class Meta:
|
|
674
674
|
table_description = "Test Exs"
|
|
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
|