xync-schema 0.6.89__py3-none-any.whl → 0.6.91__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
@@ -321,3 +321,15 @@ exs = {
321
321
  ),
322
322
  # "catalogop2p(.com": ExType.p2p, ''), todo: discover brazilian p2p platforms
323
323
  }
324
+ df_curs = {
325
+ "t": "RUB",
326
+ "alfa": "RUB",
327
+ "sber": "RUB",
328
+ "ozon": "RUB",
329
+ "volet": "RUB",
330
+ "payeer": "RUB",
331
+ "sbp": "RUB",
332
+ "yoomoney": "RUB",
333
+ "kasikorn": "THB",
334
+ "google": "INR",
335
+ }
xync_schema/models.py CHANGED
@@ -182,6 +182,7 @@ class Person(Model, TsTrait):
182
182
 
183
183
  class User(UserTg, TsTrait):
184
184
  status: UserStatus = fields.IntEnumField(UserStatus, default=UserStatus.SLEEP)
185
+ gmail_auth: dict = fields.JSONField(default={})
185
186
 
186
187
  person: fields.OneToOneRelation[Person] = fields.OneToOneField("models.Person", related_name="user")
187
188
  person_id: int
@@ -276,7 +277,7 @@ class Actor(Model):
276
277
 
277
278
 
278
279
  class Agent(Model, TsTrait):
279
- auth: dict[str, str] = fields.JSONField(default={})
280
+ auth: dict = fields.JSONField(default={})
280
281
  actor: fields.OneToOneRelation[Actor] = fields.OneToOneField("models.Actor", "agent")
281
282
  actor_id: int
282
283
 
@@ -357,7 +358,8 @@ class Pm(Model):
357
358
  # name: str = fields.CharField(63) # mv to pmex cause it diffs on each ex
358
359
  norm: str | None = fields.CharField(63)
359
360
  acronym: str | None = fields.CharField(7, null=True)
360
- country: fields.ForeignKeyRelation[Country] = fields.ForeignKeyField("models.Country", "pms", null=True)
361
+ country: fields.ForeignKeyNullableRelation[Country] = fields.ForeignKeyField("models.Country", "pms", null=True)
362
+ df_cur: fields.ForeignKeyNullableRelation[Cur] = fields.ForeignKeyField("models.Cur", "df_pms", null=True)
361
363
  alias: str | None = fields.CharField(63, null=True)
362
364
  extra: str | None = fields.CharField(63, null=True)
363
365
  ok: bool = fields.BooleanField(default=True)
@@ -388,11 +390,12 @@ class Pm(Model):
388
390
 
389
391
  class PmAgent(Model):
390
392
  pm: fields.ForeignKeyRelation[Pm] = fields.ForeignKeyField("models.Pm", related_name="agents")
391
- person: fields.ForeignKeyRelation[Person] = fields.ForeignKeyField("models.Person", related_name="pm_agents")
392
- auth: dict[str, str] = fields.JSONField(default={})
393
+ user: fields.ForeignKeyRelation[User] = fields.ForeignKeyField("models.User", related_name="pm_agents")
394
+ user_id: int
395
+ auth: dict = fields.JSONField(default={})
393
396
 
394
397
  class Meta:
395
- unique_together = (("pm_id", "person_id"),)
398
+ unique_together = (("pm_id", "user_id"),)
396
399
 
397
400
 
398
401
  class Pmcur(Model): # for fiat with no exs tie
@@ -456,8 +459,9 @@ class PmexBank(BaseModel): # banks for SBP
456
459
  class Cred(Model):
457
460
  pmcur: fields.ForeignKeyRelation[Pmcur] = fields.ForeignKeyField("models.Pmcur")
458
461
  pmcur_id: int
459
- detail: str = fields.CharField(127)
460
- name: str | None = fields.CharField(127, null=True)
462
+ detail: str = fields.CharField(84)
463
+ name: str | None = fields.CharField(84, null=True)
464
+ extra: str | None = fields.CharField(84, null=True)
461
465
  person: fields.ForeignKeyRelation[Person] = fields.ForeignKeyField("models.Person", "creds")
462
466
  person_id: int
463
467
 
@@ -513,6 +517,19 @@ class Fiat(Model):
513
517
  return sys.modules[module_name].FiatEpyd
514
518
 
515
519
 
520
+ class Rival(Model, TsTrait):
521
+ actor: fields.ForeignKeyRelation[Actor] = fields.ForeignKeyField("models.Actor")
522
+ actor_id: int
523
+ direction: fields.ForeignKeyRelation[Direction] = fields.ForeignKeyField("models.Direction")
524
+ direction_id: int
525
+ pm: fields.ForeignKeyRelation[Pm] = fields.ForeignKeyField("models.Pm")
526
+ pm_id: int
527
+ rplace: int = fields.SmallIntField()
528
+ price: float = fields.SmallIntField()
529
+ exec_rate: int = fields.SmallIntField()
530
+ completed: int = fields.SmallIntField()
531
+
532
+
516
533
  class Limit(Model):
517
534
  pmcur: fields.ForeignKeyRelation[Pmcur] = fields.ForeignKeyField("models.Pmcur")
518
535
  pmcur_id: int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xync-schema
3
- Version: 0.6.89
3
+ Version: 0.6.91
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=V0FYnenVT4gR5IN3zrAFRP2M7mHbQDoqwRl5xSI-lNc,12911
3
+ xync_schema/models.py,sha256=n3Hpr0m5RyyK6PwsgJXmZtwdxkC6XI56A9BGBe4EC8Y,30446
4
+ xync_schema/types.py,sha256=sYWjJMcwv7mjm38FnWyxWhT6Z4bGpt92BTVZrqyZ0Ic,1675
5
+ xync_schema-0.6.91.dist-info/METADATA,sha256=PUcbzJoipJc6iclAQx9CLrQnDGW5L4YC1_Ec9MxdSZs,4055
6
+ xync_schema-0.6.91.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
7
+ xync_schema-0.6.91.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
8
+ xync_schema-0.6.91.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- xync_schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- xync_schema/enums.py,sha256=MM5s20GpI8gsPlPS9nYFtkyrPheTvlcDYESwjnZ4Hmg,12698
3
- xync_schema/models.py,sha256=IOgxR8Cvwnwbd86tNciN_HMxxdu1uYjySZUh6BhrjJQ,29717
4
- xync_schema/types.py,sha256=sYWjJMcwv7mjm38FnWyxWhT6Z4bGpt92BTVZrqyZ0Ic,1675
5
- xync_schema-0.6.89.dist-info/METADATA,sha256=w38w1TuVYWZL_dgKsN9cqV636ou-oA4bB2xtmNbxZrc,4055
6
- xync_schema-0.6.89.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
7
- xync_schema-0.6.89.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
8
- xync_schema-0.6.89.dist-info/RECORD,,