xync-schema 0.6.37__py3-none-any.whl → 0.6.38__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/models.py CHANGED
@@ -7,29 +7,29 @@ from x_auth.models import Model
7
7
  from x_model.models import TsTrait, DatetimeSecField
8
8
  from tg_auth.models import UserStatus, AuthUser
9
9
 
10
- from xync_schema.enums import ExType, AdStatus, PmType, AssetType, OrderStatus, ExAction
10
+ from xync_schema.enums import ExType, AdStatus, AssetType, OrderStatus, ExAction
11
11
 
12
12
 
13
- class Country(Model):
14
- id = fields.SmallIntField(True)
15
- code: int | None = fields.IntField(null=True)
16
- short: str | None = fields.CharField(3, unique=True, null=True)
17
- name: str | None = fields.CharField(63, unique=True, null=True)
18
- cur: fields.ForeignKeyRelation["Cur"] = fields.ForeignKeyField("models.Cur", related_name="countries")
19
- curexs: fields.ManyToManyRelation["Curex"]
20
- fiats: fields.BackwardFKRelation["Fiat"]
13
+ # class Country(Model):
14
+ # id = fields.SmallIntField(True)
15
+ # code: int | None = fields.IntField(null=True)
16
+ # short: str | None = fields.CharField(3, unique=True, null=True)
17
+ # name: str | None = fields.CharField(63, unique=True, null=True)
18
+ # cur: fields.ForeignKeyRelation["Cur"] = fields.ForeignKeyField("models.Cur", related_name="countries")
19
+ # curexs: fields.ManyToManyRelation["Curex"]
20
+ # fiats: fields.BackwardFKRelation["Fiat"]
21
21
 
22
22
 
23
23
  class Cur(Model):
24
24
  id = fields.SmallIntField(True)
25
25
  ticker: str = fields.CharField(3, unique=True)
26
26
  rate: float | None = fields.FloatField(null=True)
27
- country: str | None = fields.CharField(63, null=True)
27
+ # country: str | None = fields.CharField(63, null=True)
28
28
 
29
29
  pms: fields.ManyToManyRelation["Pm"] = fields.ManyToManyField("models.Pm", through="pmcur")
30
30
  exs: fields.ManyToManyRelation["Ex"] = fields.ManyToManyField("models.Ex", through="curex")
31
31
  pairs: fields.ReverseRelation["Pair"]
32
- countries: fields.ReverseRelation[Country]
32
+ # countries: fields.ReverseRelation[Country]
33
33
 
34
34
  _name = {"ticker"}
35
35
 
@@ -92,9 +92,9 @@ class Curex(BaseModel):
92
92
  ex: fields.ForeignKeyRelation[Ex] = fields.ForeignKeyField("models.Ex")
93
93
  exid: str = fields.CharField(31)
94
94
  p2p: bool = fields.BooleanField(default=True)
95
- countries: fields.ManyToManyRelation[Country] = fields.ManyToManyField(
96
- "models.Country", through="curexcountry", backward_key="curexs"
97
- )
95
+ # countries: fields.ManyToManyRelation[Country] = fields.ManyToManyField(
96
+ # "models.Country", through="curexcountry", backward_key="curexs"
97
+ # )
98
98
 
99
99
  class Meta:
100
100
  table_description = "Currency in Exchange"
@@ -246,12 +246,11 @@ class Ad(Model, TsTrait):
246
246
 
247
247
 
248
248
  class Pm(Model):
249
- name: str = fields.CharField(63, unique=True)
250
- # identifier: str | None = fields.CharField(63, unique=True, null=True)
251
- rank: int | None = fields.SmallIntField(default=0)
252
- type_: PmType | None = fields.IntEnumField(PmType, null=True)
249
+ name: str = fields.CharField(63, unique=False)
250
+ identifier: str | None = fields.CharField(63, unique=False, null=True)
251
+ # type_: PmType | None = fields.IntEnumField(PmType, null=True)
252
+ type_: int | None = fields.SmallIntField(null=True)
253
253
  logo: str | None = fields.CharField(127, null=True)
254
- multiAllow: bool | None = fields.BooleanField(null=True)
255
254
 
256
255
  ads: fields.ManyToManyRelation[Ad]
257
256
  curs: fields.ManyToManyRelation[Cur]
@@ -310,8 +309,8 @@ class Pmcurex(BaseModel): # existence pm in ex for exact cur, with "blocked" fl
310
309
  class Fiat(Model):
311
310
  pmcur: fields.ForeignKeyRelation[Pmcur] = fields.ForeignKeyField("models.Pmcur")
312
311
  pmcur_id: int
313
- country: fields.ForeignKeyRelation[Country] = fields.ForeignKeyField("models.Country", related_name="fiats")
314
- country_id: int
312
+ # country: fields.ForeignKeyRelation[Country] = fields.ForeignKeyField("models.Country", related_name="fiats")
313
+ # country_id: int
315
314
  detail: str = fields.CharField(127)
316
315
  name: str | None = fields.CharField(127, null=True)
317
316
  user: fields.ForeignKeyRelation[User] = fields.ForeignKeyField("models.User", "fiats")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xync-schema
3
- Version: 0.6.37
3
+ Version: 0.6.38
4
4
  Summary: XyncNet project database model schema
5
5
  Author-email: Mike Artemiev <mixartemev@gmail.com>
6
6
  License: EULA
@@ -82,17 +82,9 @@ class CoinEx {
82
82
  smallint ex_id
83
83
  integer id
84
84
  }
85
- class Country {
86
- integer code
87
- varchar(3) short
88
- varchar(63) name
89
- smallint cur_id
90
- smallint id
91
- }
92
85
  class Cur {
93
86
  varchar(3) ticker
94
87
  double precision rate
95
- varchar(63) country
96
88
  smallint id
97
89
  }
98
90
  class CurEx {
@@ -102,10 +94,6 @@ class CurEx {
102
94
  smallint ex_id
103
95
  integer id
104
96
  }
105
- class CurExCountry {
106
- integer curexs
107
- smallint country_id
108
- }
109
97
  class Ex {
110
98
  varchar(31) name
111
99
  varchar(63) host /* With no protocol 'https://' */
@@ -120,7 +108,6 @@ class Fiat {
120
108
  varchar(127) name
121
109
  double precision amount
122
110
  double precision target
123
- smallint country_id
124
111
  integer pmcur_id
125
112
  bigint user_id
126
113
  integer id
@@ -181,12 +168,8 @@ Asset --> Agent : agent_id-id
181
168
  Asset --> Coin : coin_id-id
182
169
  CoinEx --> Coin : coin_id-id
183
170
  CoinEx --> Ex : ex_id-id
184
- Country --> Cur : cur_id-id
185
171
  CurEx --> Cur : cur_id-id
186
172
  CurEx --> Ex : ex_id-id
187
- CurExCountry --> Country : country_id-id
188
- CurExCountry --> CurEx : curexs-id
189
- Fiat --> Country : country_id-id
190
173
  Fiat --> PmCur : pmcur_id-id
191
174
  Fiat --> User : user_id-id
192
175
  FiatEx --> Ex : ex_id-id
@@ -200,5 +183,4 @@ PmCurEx --> PmCur : pmcur_id-id
200
183
  PmEx --> Ex : ex_id-id
201
184
  PmEx --> Pm : pm_id-id
202
185
  User --> User : ref_id-id
203
-
204
186
  ```
@@ -0,0 +1,8 @@
1
+ xync_schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ xync_schema/enums.py,sha256=oOpyfG2i1-UKD8Udh2sVBIMUHTIhKZMPIA6Rh7lqnDA,10013
3
+ xync_schema/models.py,sha256=6O9YYmwjqDF5e-Oe-38B3t-b8rH5AIuPw_2nLw5RT5I,20070
4
+ xync_schema/pydantic.py,sha256=cyviSX1P2Cj6fLFq_IsrYdWB6gBOYwR4adPXrAmlP7g,274
5
+ xync_schema-0.6.38.dist-info/METADATA,sha256=peqU_tPkRmXAUDEVxg1kbKvi8Oo7lce1pUceGWzGNVA,3988
6
+ xync_schema-0.6.38.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
7
+ xync_schema-0.6.38.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
8
+ xync_schema-0.6.38.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.4.0)
2
+ Generator: setuptools (75.5.0)
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=oOpyfG2i1-UKD8Udh2sVBIMUHTIhKZMPIA6Rh7lqnDA,10013
3
- xync_schema/models.py,sha256=x5RiBV1Wvqwu9TSezDyGtyXqIQBhbDZJM6EOVl2F4t0,20106
4
- xync_schema/pydantic.py,sha256=cyviSX1P2Cj6fLFq_IsrYdWB6gBOYwR4adPXrAmlP7g,274
5
- xync_schema-0.6.37.dist-info/METADATA,sha256=uHomi_tU8TxJIpbejuWbSnAEQ2jQt2TAk_9ENjgpiJ4,4352
6
- xync_schema-0.6.37.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
7
- xync_schema-0.6.37.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
8
- xync_schema-0.6.37.dist-info/RECORD,,