xync-schema 0.6.76__tar.gz → 0.6.78__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.76/xync_schema.egg-info → xync_schema-0.6.78}/PKG-INFO +1 -1
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema/enums.py +1 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema/models.py +17 -17
- {xync_schema-0.6.76 → xync_schema-0.6.78/xync_schema.egg-info}/PKG-INFO +1 -1
- {xync_schema-0.6.76 → xync_schema-0.6.78}/.env.sample +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/.gitignore +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/README.md +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/makefile +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/pyproject.toml +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/setup.cfg +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/tests/__init__.py +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/tests/test_db.py +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema/types.py +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.76 → xync_schema-0.6.78}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -137,7 +137,7 @@ class Pair(Model):
|
|
|
137
137
|
|
|
138
138
|
class Meta:
|
|
139
139
|
table_description = "Coin/Currency pairs"
|
|
140
|
-
unique_together = (("
|
|
140
|
+
unique_together = (("coin_id", "cur_id"),)
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
class PairEx(Model, TsTrait):
|
|
@@ -152,7 +152,7 @@ class PairEx(Model, TsTrait):
|
|
|
152
152
|
|
|
153
153
|
class Meta:
|
|
154
154
|
table_description = "Pairs on Exs"
|
|
155
|
-
unique_together = (("
|
|
155
|
+
unique_together = (("pair_id", "ex_id"),)
|
|
156
156
|
|
|
157
157
|
|
|
158
158
|
class Direction(Model):
|
|
@@ -167,7 +167,7 @@ class Direction(Model):
|
|
|
167
167
|
|
|
168
168
|
class Meta:
|
|
169
169
|
table_description = "Trade directions"
|
|
170
|
-
unique_together = (("
|
|
170
|
+
unique_together = (("pairex_id", "sell"),)
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
class Person(Model, TsTrait):
|
|
@@ -251,7 +251,7 @@ class Actor(Model):
|
|
|
251
251
|
|
|
252
252
|
class Meta:
|
|
253
253
|
table_description = "Actors"
|
|
254
|
-
unique_together = (("
|
|
254
|
+
unique_together = (("ex_id", "exid"), ("ex_id", "person_id"))
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
class Agent(Model, TsTrait):
|
|
@@ -270,7 +270,7 @@ class Agent(Model, TsTrait):
|
|
|
270
270
|
module_name = f"xync_client.{self.actor.ex.name}.agent"
|
|
271
271
|
__import__(module_name)
|
|
272
272
|
client = sys.modules[module_name].AgentClient
|
|
273
|
-
return client(self)
|
|
273
|
+
return client(self, headers=self.auth.get("headers"), cookies=self.auth.get("cookies"))
|
|
274
274
|
|
|
275
275
|
# def in_client(self) -> "BaseInAgentClient":
|
|
276
276
|
# import sys
|
|
@@ -359,7 +359,6 @@ class Pm(Model):
|
|
|
359
359
|
bank: bool | None = fields.BooleanField(null=True)
|
|
360
360
|
|
|
361
361
|
typ: PmType | None = fields.IntEnumField(PmType, null=True)
|
|
362
|
-
logo: fields.ForeignKeyNullableRelation["File"] = fields.ForeignKeyField("models.File", "pm_logos", null=True)
|
|
363
362
|
|
|
364
363
|
ads: fields.ManyToManyRelation[Ad]
|
|
365
364
|
curs: fields.ManyToManyRelation[Cur]
|
|
@@ -394,7 +393,7 @@ class Pmcur(Model): # for fiat with no exs tie
|
|
|
394
393
|
|
|
395
394
|
class Meta:
|
|
396
395
|
table_description = "Payment methods - Currencies"
|
|
397
|
-
# unique_together = ("
|
|
396
|
+
# unique_together = ("pm_id", "cur_id"),
|
|
398
397
|
|
|
399
398
|
class PydanticMeta(Model.PydanticMeta):
|
|
400
399
|
max_recursion: int = 2 # default: 3
|
|
@@ -406,17 +405,15 @@ class Pmex(BaseModel): # existence pm in ex with no cur tie
|
|
|
406
405
|
ex_id: int
|
|
407
406
|
pm: fields.ForeignKeyRelation[Pm] = fields.ForeignKeyField("models.Pm", "pmexs")
|
|
408
407
|
pm_id: int
|
|
408
|
+
logo: fields.ForeignKeyNullableRelation["File"] = fields.ForeignKeyField("models.File", "pmex_logos", null=True)
|
|
409
|
+
logo_id: int
|
|
409
410
|
exid: str = fields.CharField(63)
|
|
410
411
|
name: str = fields.CharField(63)
|
|
411
|
-
name_: str = fields.CharField(63, null=True)
|
|
412
412
|
|
|
413
413
|
banks: fields.BackwardFKRelation["PmexBank"]
|
|
414
414
|
|
|
415
415
|
class Meta:
|
|
416
|
-
unique_together = (
|
|
417
|
-
("ex", "exid"),
|
|
418
|
-
("ex", "name_"),
|
|
419
|
-
) # , ("ex", "pm"), ("ex", "name") # todo: tmp removed for HTX duplicates
|
|
416
|
+
unique_together = (("ex_id", "exid"),) # , ("ex", "pm"), ("ex", "name") # todo: tmp removed for HTX duplicates
|
|
420
417
|
|
|
421
418
|
|
|
422
419
|
class PmexBank(BaseModel): # banks for SBP
|
|
@@ -454,6 +451,7 @@ class Cred(Model):
|
|
|
454
451
|
|
|
455
452
|
fiat: fields.BackwardOneToOneRelation["Fiat"]
|
|
456
453
|
ads: fields.ManyToManyRelation[Ad]
|
|
454
|
+
credexs: fields.BackwardFKRelation["CredEx"]
|
|
457
455
|
orders: fields.BackwardFKRelation["Order"]
|
|
458
456
|
|
|
459
457
|
_name = {"detail"}
|
|
@@ -474,7 +472,7 @@ class CredEx(Model):
|
|
|
474
472
|
|
|
475
473
|
class Meta:
|
|
476
474
|
table_description = "Credential on Exchange"
|
|
477
|
-
unique_together = (("
|
|
475
|
+
unique_together = (("ex_id", "exid"),)
|
|
478
476
|
|
|
479
477
|
|
|
480
478
|
class Fiat(Model):
|
|
@@ -531,7 +529,7 @@ class Asset(Model):
|
|
|
531
529
|
|
|
532
530
|
class Meta:
|
|
533
531
|
table_description = "Coin balance"
|
|
534
|
-
unique_together = (("
|
|
532
|
+
unique_together = (("coin_id", "agent_id", "type_"),)
|
|
535
533
|
|
|
536
534
|
class PydanticMeta(Model.PydanticMeta):
|
|
537
535
|
max_recursion: int = 2 # default: 3
|
|
@@ -639,7 +637,7 @@ class Msg(Model):
|
|
|
639
637
|
#
|
|
640
638
|
# class Meta:
|
|
641
639
|
# table_description = "Investment products"
|
|
642
|
-
# unique_together = (("pid", "type_", "
|
|
640
|
+
# unique_together = (("pid", "type_", "ex_id"),)
|
|
643
641
|
|
|
644
642
|
|
|
645
643
|
# class Investment(Model, TsTrait):
|
|
@@ -674,7 +672,7 @@ class TestEx(Model):
|
|
|
674
672
|
|
|
675
673
|
class Meta:
|
|
676
674
|
table_description = "Test Exs"
|
|
677
|
-
unique_together = (("action", "
|
|
675
|
+
unique_together = (("action", "ex_id"),)
|
|
678
676
|
|
|
679
677
|
class PydanticMeta(Model.PydanticMeta):
|
|
680
678
|
max_recursion: int = 2
|
|
@@ -698,13 +696,15 @@ class Vpn(Model):
|
|
|
698
696
|
|
|
699
697
|
|
|
700
698
|
class File(Model):
|
|
701
|
-
name: str = fields.CharField(
|
|
699
|
+
name: str = fields.CharField(178, null=True)
|
|
702
700
|
typ: FileType = fields.IntEnumField(FileType, null=True)
|
|
703
701
|
fid: str = fields.CharField(76, unique=True, null=True)
|
|
704
702
|
ref: bytes = fields.BinaryField(null=True)
|
|
705
703
|
size: bytes = fields.IntField()
|
|
706
704
|
created_at: datetime | None = DatetimeSecField(auto_now_add=True)
|
|
707
705
|
|
|
706
|
+
pmex_logos: fields.BackwardFKRelation[Pmex]
|
|
707
|
+
|
|
708
708
|
_icon = "file"
|
|
709
709
|
_name = {"name"}
|
|
710
710
|
|
|
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
|