xync-schema 0.6.54.dev2__tar.gz → 0.6.56__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: xync-schema
3
- Version: 0.6.54.dev2
3
+ Version: 0.6.56
4
4
  Summary: XyncNet project database model schema
5
5
  Author-email: Mike Artemiev <mixartemev@gmail.com>
6
6
  License: EULA
@@ -136,7 +136,6 @@ class ExAction(IntEnum):
136
136
 
137
137
  """ Assets """
138
138
  assets = 39 # Балансы моих монет
139
- # got_asset = -39
140
139
  deposit = 40 # Получить реквизиты для депозита монеты
141
140
  deposited = -40 # Получена монета
142
141
  withdraw = 41 # Вывести монету
@@ -219,6 +219,14 @@ class Agent(Model):
219
219
  client = sys.modules[module_name].AgentClient
220
220
  return client(self)
221
221
 
222
+ def asset_client(self):
223
+ import sys
224
+
225
+ module_name = f"xync_client.{self.ex.name}.asset"
226
+ __import__(module_name)
227
+ client = sys.modules[module_name].AssetClient
228
+ return client(self)
229
+
222
230
 
223
231
  class Adpm(Model):
224
232
  ad: fields.ForeignKeyRelation["Ad"] = fields.ForeignKeyField("models.Ad")
@@ -433,7 +441,9 @@ class Order(Model):
433
441
  table_description = "P2P Orders"
434
442
 
435
443
  class PydanticMeta(Model.PydanticMeta):
436
- exclude = ("taker",)
444
+ max_recursion: int = 0
445
+ exclude_raw_fields: bool = False
446
+ exclude = ("taker", "ad", "fiat", "msgs")
437
447
 
438
448
 
439
449
  class Msg(Model):
@@ -443,6 +453,11 @@ class Msg(Model):
443
453
  receiver: fields.ForeignKeyRelation[Agent] = fields.ForeignKeyField("models.User", related_name="msgs")
444
454
  order: fields.ForeignKeyRelation[Order] = fields.ForeignKeyField("models.Order", related_name="msgs")
445
455
 
456
+ class PydanticMeta(Model.PydanticMeta):
457
+ max_recursion: int = 0
458
+ exclude_raw_fields: bool = False
459
+ exclude = ("receiver", "order")
460
+
446
461
 
447
462
  # class Dep(Model, TsTrait):
448
463
  # pid: str = fields.CharField(31) # product_id
@@ -1,6 +1,7 @@
1
1
  from datetime import datetime
2
2
 
3
3
  from pydantic import BaseModel
4
+
4
5
  from xync_schema.models import Fiat, Msg
5
6
 
6
7
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: xync-schema
3
- Version: 0.6.54.dev2
3
+ Version: 0.6.56
4
4
  Summary: XyncNet project database model schema
5
5
  Author-email: Mike Artemiev <mixartemev@gmail.com>
6
6
  License: EULA
File without changes