xync-schema 0.6.85__tar.gz → 0.6.86__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.85/xync_schema.egg-info → xync_schema-0.6.86}/PKG-INFO +1 -1
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema/enums.py +1 -1
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema/models.py +24 -13
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema/types.py +2 -2
- {xync_schema-0.6.85 → xync_schema-0.6.86/xync_schema.egg-info}/PKG-INFO +1 -1
- {xync_schema-0.6.85 → xync_schema-0.6.86}/.env.sample +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/.gitignore +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/README.md +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/makefile +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/pyproject.toml +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/setup.cfg +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/tests/__init__.py +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/tests/test_db.py +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.85 → xync_schema-0.6.86}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -10,7 +10,6 @@ from x_model.models import TsTrait, DatetimeSecField
|
|
|
10
10
|
from xync_schema.enums import (
|
|
11
11
|
ExType,
|
|
12
12
|
AdStatus,
|
|
13
|
-
AssetType,
|
|
14
13
|
OrderStatus,
|
|
15
14
|
ExAction,
|
|
16
15
|
ExStatus,
|
|
@@ -18,6 +17,7 @@ from xync_schema.enums import (
|
|
|
18
17
|
UserStatus,
|
|
19
18
|
PmType,
|
|
20
19
|
FileType,
|
|
20
|
+
AddrExType,
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
|
|
@@ -327,7 +327,7 @@ class Ad(Model, TsTrait):
|
|
|
327
327
|
maker_id: int
|
|
328
328
|
pay_req: fields.ForeignKeyNullableRelation["PayReq"] = fields.ForeignKeyField("models.PayReq", "ads", null=True)
|
|
329
329
|
|
|
330
|
-
pmexs: fields.ManyToManyRelation["Pmex"] = fields.ManyToManyField("models.
|
|
330
|
+
pmexs: fields.ManyToManyRelation["Pmex"] = fields.ManyToManyField("models.Pmex", "adpmex", related_name="ads")
|
|
331
331
|
credexs: fields.ManyToManyRelation["CredEx"] = fields.ManyToManyField(
|
|
332
332
|
"models.CredEx", through="adcredex", related_name="ads"
|
|
333
333
|
)
|
|
@@ -396,7 +396,7 @@ class Pmcur(Model): # for fiat with no exs tie
|
|
|
396
396
|
|
|
397
397
|
class Meta:
|
|
398
398
|
table_description = "Payment methods - Currencies"
|
|
399
|
-
|
|
399
|
+
unique_together = (("pm_id", "cur_id"),)
|
|
400
400
|
|
|
401
401
|
class PydanticMeta(Model.PydanticMeta):
|
|
402
402
|
max_recursion: int = 2 # default: 3
|
|
@@ -521,27 +521,38 @@ class Limit(Model):
|
|
|
521
521
|
table_description = "Currency accounts balance"
|
|
522
522
|
|
|
523
523
|
|
|
524
|
-
class
|
|
525
|
-
coin: fields.ForeignKeyRelation[Coin] = fields.ForeignKeyField("models.Coin", related_name="
|
|
524
|
+
class Addr(Model):
|
|
525
|
+
coin: fields.ForeignKeyRelation[Coin] = fields.ForeignKeyField("models.Coin", related_name="addrs")
|
|
526
526
|
coin_id: int
|
|
527
|
+
actor: fields.ForeignKeyRelation[Actor] = fields.ForeignKeyField("models.Actor", "addrs")
|
|
528
|
+
actor_id: int
|
|
529
|
+
|
|
530
|
+
pay_reqs: fields.ReverseRelation["PayReq"]
|
|
531
|
+
|
|
532
|
+
_name = {"coin__ticker", "free"}
|
|
533
|
+
|
|
534
|
+
class Meta:
|
|
535
|
+
table_description = "Coin address on cex"
|
|
536
|
+
unique_together = (("coin_id", "actor_id"),)
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
class Asset(Model):
|
|
540
|
+
addr: fields.ForeignKeyRelation[Addr] = fields.ForeignKeyField("models.Addr", related_name="addrs")
|
|
541
|
+
addr_id: int
|
|
527
542
|
agent: fields.ForeignKeyRelation[Agent] = fields.ForeignKeyField("models.Agent", "assets")
|
|
528
543
|
agent_id: int
|
|
529
|
-
|
|
544
|
+
|
|
545
|
+
typ: AddrExType = fields.IntEnumField(AddrExType, default=AddrExType.found)
|
|
530
546
|
free: float = fields.FloatField()
|
|
531
547
|
freeze: float | None = fields.FloatField(default=0)
|
|
532
548
|
lock: float | None = fields.FloatField(default=0)
|
|
533
549
|
target: float | None = fields.FloatField(default=0, null=True)
|
|
534
550
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
_name = {"coin__ticker", "free"}
|
|
551
|
+
_name = {"asset__coin__ticker", "free"}
|
|
538
552
|
|
|
539
553
|
class Meta:
|
|
540
554
|
table_description = "Coin balance"
|
|
541
|
-
unique_together = (("
|
|
542
|
-
|
|
543
|
-
class PydanticMeta(Model.PydanticMeta):
|
|
544
|
-
max_recursion: int = 2 # default: 3
|
|
555
|
+
unique_together = (("addr_id", "agent_id", "typ"),)
|
|
545
556
|
|
|
546
557
|
def epyd(self):
|
|
547
558
|
module_name = f"xync_client.{self.agent.ex.name}.pyd"
|
|
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
|