xync-schema 0.6.89__tar.gz → 0.6.91__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.89/xync_schema.egg-info → xync_schema-0.6.91}/PKG-INFO +1 -1
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema/enums.py +12 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema/models.py +24 -7
- {xync_schema-0.6.89 → xync_schema-0.6.91/xync_schema.egg-info}/PKG-INFO +1 -1
- {xync_schema-0.6.89 → xync_schema-0.6.91}/.env.sample +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/.gitignore +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/README.md +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/makefile +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/pyproject.toml +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/setup.cfg +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/tests/__init__.py +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/tests/test_db.py +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema/types.py +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.89 → xync_schema-0.6.91}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -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
|
+
}
|
|
@@ -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
|
|
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.
|
|
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
|
-
|
|
392
|
-
|
|
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", "
|
|
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(
|
|
460
|
-
name: str | None = fields.CharField(
|
|
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
|
|
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
|