xync-schema 0.6.75__py3-none-any.whl → 0.6.77__py3-none-any.whl

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/enums.py CHANGED
@@ -92,6 +92,7 @@ class FileType(IntEnum):
92
92
  gif = 7
93
93
  svg = 8
94
94
  tgs = 9
95
+ jpeg = 10
95
96
 
96
97
 
97
98
  class ExStatus(IntEnum):
xync_schema/models.py CHANGED
@@ -104,7 +104,7 @@ class Curex(BaseModel):
104
104
  cur: fields.ForeignKeyRelation[Cur] = fields.ForeignKeyField("models.Cur")
105
105
  ex: fields.ForeignKeyRelation[Ex] = fields.ForeignKeyField("models.Ex")
106
106
  exid: str = fields.CharField(32)
107
- minimum: int = fields.SmallIntField(null=True)
107
+ minimum: int = fields.IntField(null=True)
108
108
  rounding_scale: int = fields.SmallIntField(null=True)
109
109
  countries: fields.ManyToManyRelation[Country] = fields.ManyToManyField(
110
110
  "models.Country", through="curexcountry", backward_key="curexs"
@@ -137,7 +137,7 @@ class Pair(Model):
137
137
 
138
138
  class Meta:
139
139
  table_description = "Coin/Currency pairs"
140
- unique_together = (("coin", "cur"),)
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 = (("pair", "ex"),)
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 = (("pairex", "sell"),)
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 = (("ex", "exid"), ("ex", "person"))
254
+ unique_together = (("ex_id", "exid"), ("ex_id", "person_id"))
255
255
 
256
256
 
257
257
  class Agent(Model, TsTrait):
@@ -394,7 +394,7 @@ class Pmcur(Model): # for fiat with no exs tie
394
394
 
395
395
  class Meta:
396
396
  table_description = "Payment methods - Currencies"
397
- # unique_together = ("pm", "cur"),
397
+ # unique_together = ("pm_id", "cur_id"),
398
398
 
399
399
  class PydanticMeta(Model.PydanticMeta):
400
400
  max_recursion: int = 2 # default: 3
@@ -414,8 +414,8 @@ class Pmex(BaseModel): # existence pm in ex with no cur tie
414
414
 
415
415
  class Meta:
416
416
  unique_together = (
417
- ("ex", "exid"),
418
- ("ex", "name_"),
417
+ ("ex_id", "exid"),
418
+ ("ex_id", "name_"),
419
419
  ) # , ("ex", "pm"), ("ex", "name") # todo: tmp removed for HTX duplicates
420
420
 
421
421
 
@@ -454,6 +454,7 @@ class Cred(Model):
454
454
 
455
455
  fiat: fields.BackwardOneToOneRelation["Fiat"]
456
456
  ads: fields.ManyToManyRelation[Ad]
457
+ credexs: fields.BackwardFKRelation["CredEx"]
457
458
  orders: fields.BackwardFKRelation["Order"]
458
459
 
459
460
  _name = {"detail"}
@@ -474,7 +475,7 @@ class CredEx(Model):
474
475
 
475
476
  class Meta:
476
477
  table_description = "Credential on Exchange"
477
- unique_together = (("ex", "exid"),)
478
+ unique_together = (("ex_id", "exid"),)
478
479
 
479
480
 
480
481
  class Fiat(Model):
@@ -531,7 +532,7 @@ class Asset(Model):
531
532
 
532
533
  class Meta:
533
534
  table_description = "Coin balance"
534
- unique_together = (("coin", "agent", "type_"),)
535
+ unique_together = (("coin_id", "agent_id", "type_"),)
535
536
 
536
537
  class PydanticMeta(Model.PydanticMeta):
537
538
  max_recursion: int = 2 # default: 3
@@ -639,7 +640,7 @@ class Msg(Model):
639
640
  #
640
641
  # class Meta:
641
642
  # table_description = "Investment products"
642
- # unique_together = (("pid", "type_", "ex"),)
643
+ # unique_together = (("pid", "type_", "ex_id"),)
643
644
 
644
645
 
645
646
  # class Investment(Model, TsTrait):
@@ -674,7 +675,7 @@ class TestEx(Model):
674
675
 
675
676
  class Meta:
676
677
  table_description = "Test Exs"
677
- unique_together = (("action", "ex"),)
678
+ unique_together = (("action", "ex_id"),)
678
679
 
679
680
  class PydanticMeta(Model.PydanticMeta):
680
681
  max_recursion: int = 2
@@ -698,7 +699,7 @@ class Vpn(Model):
698
699
 
699
700
 
700
701
  class File(Model):
701
- name: str = fields.CharField(51, null=True)
702
+ name: str = fields.CharField(178, null=True)
702
703
  typ: FileType = fields.IntEnumField(FileType, null=True)
703
704
  fid: str = fields.CharField(76, unique=True, null=True)
704
705
  ref: bytes = fields.BinaryField(null=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xync-schema
3
- Version: 0.6.75
3
+ Version: 0.6.77
4
4
  Summary: XyncNet project database model schema
5
5
  Author-email: Mike Artemiev <mixartemev@gmail.com>
6
6
  License: EULA
@@ -0,0 +1,8 @@
1
+ xync_schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ xync_schema/enums.py,sha256=tE3xRj3hWOSJvFkYMv4X5bGfAkjR7OzNmVnqj1X47Go,12697
3
+ xync_schema/models.py,sha256=LO3PLB7DcRaMyKrIE0w7eY5Jhbt3AX-IRuUSBY3ApG0,27737
4
+ xync_schema/types.py,sha256=jubMlsGkaLpv1QZrInP0sEKW8SgWa6TyHENDz8OEvDM,1737
5
+ xync_schema-0.6.77.dist-info/METADATA,sha256=PME5UTQ_MjyhCB-JQBuDcnXRAJ3P-LJ2pS1fR-5XSTE,4055
6
+ xync_schema-0.6.77.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
7
+ xync_schema-0.6.77.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
8
+ xync_schema-0.6.77.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- xync_schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- xync_schema/enums.py,sha256=LJme_4FsisEjXX3sDsvfB8xi6Lt0xe27FNRHEYzOUmg,12683
3
- xync_schema/models.py,sha256=GAO3xwg9xA-6RWskB5amYsJ8m3hgaQSDmHhHpbEPFg8,27641
4
- xync_schema/types.py,sha256=jubMlsGkaLpv1QZrInP0sEKW8SgWa6TyHENDz8OEvDM,1737
5
- xync_schema-0.6.75.dist-info/METADATA,sha256=s_8szki_cHh4g6fafDnZ53gtRsX64L9GmiKjoaX8FRk,4055
6
- xync_schema-0.6.75.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
7
- xync_schema-0.6.75.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
8
- xync_schema-0.6.75.dist-info/RECORD,,