xync-schema 0.6.37__tar.gz → 0.6.38__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.37/xync_schema.egg-info → xync_schema-0.6.38}/PKG-INFO +1 -19
- {xync_schema-0.6.37 → xync_schema-0.6.38}/README.md +0 -18
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema/models.py +20 -21
- {xync_schema-0.6.37 → xync_schema-0.6.38/xync_schema.egg-info}/PKG-INFO +1 -19
- {xync_schema-0.6.37 → xync_schema-0.6.38}/.env.sample +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/.gitignore +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/makefile +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/pyproject.toml +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/setup.cfg +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/tests/__init__.py +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/tests/test_db.py +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema/enums.py +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema/pydantic.py +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.37 → xync_schema-0.6.38}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xync-schema
|
|
3
|
-
Version: 0.6.
|
|
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
|
```
|
|
@@ -66,17 +66,9 @@ class CoinEx {
|
|
|
66
66
|
smallint ex_id
|
|
67
67
|
integer id
|
|
68
68
|
}
|
|
69
|
-
class Country {
|
|
70
|
-
integer code
|
|
71
|
-
varchar(3) short
|
|
72
|
-
varchar(63) name
|
|
73
|
-
smallint cur_id
|
|
74
|
-
smallint id
|
|
75
|
-
}
|
|
76
69
|
class Cur {
|
|
77
70
|
varchar(3) ticker
|
|
78
71
|
double precision rate
|
|
79
|
-
varchar(63) country
|
|
80
72
|
smallint id
|
|
81
73
|
}
|
|
82
74
|
class CurEx {
|
|
@@ -86,10 +78,6 @@ class CurEx {
|
|
|
86
78
|
smallint ex_id
|
|
87
79
|
integer id
|
|
88
80
|
}
|
|
89
|
-
class CurExCountry {
|
|
90
|
-
integer curexs
|
|
91
|
-
smallint country_id
|
|
92
|
-
}
|
|
93
81
|
class Ex {
|
|
94
82
|
varchar(31) name
|
|
95
83
|
varchar(63) host /* With no protocol 'https://' */
|
|
@@ -104,7 +92,6 @@ class Fiat {
|
|
|
104
92
|
varchar(127) name
|
|
105
93
|
double precision amount
|
|
106
94
|
double precision target
|
|
107
|
-
smallint country_id
|
|
108
95
|
integer pmcur_id
|
|
109
96
|
bigint user_id
|
|
110
97
|
integer id
|
|
@@ -165,12 +152,8 @@ Asset --> Agent : agent_id-id
|
|
|
165
152
|
Asset --> Coin : coin_id-id
|
|
166
153
|
CoinEx --> Coin : coin_id-id
|
|
167
154
|
CoinEx --> Ex : ex_id-id
|
|
168
|
-
Country --> Cur : cur_id-id
|
|
169
155
|
CurEx --> Cur : cur_id-id
|
|
170
156
|
CurEx --> Ex : ex_id-id
|
|
171
|
-
CurExCountry --> Country : country_id-id
|
|
172
|
-
CurExCountry --> CurEx : curexs-id
|
|
173
|
-
Fiat --> Country : country_id-id
|
|
174
157
|
Fiat --> PmCur : pmcur_id-id
|
|
175
158
|
Fiat --> User : user_id-id
|
|
176
159
|
FiatEx --> Ex : ex_id-id
|
|
@@ -184,5 +167,4 @@ PmCurEx --> PmCur : pmcur_id-id
|
|
|
184
167
|
PmEx --> Ex : ex_id-id
|
|
185
168
|
PmEx --> Pm : pm_id-id
|
|
186
169
|
User --> User : ref_id-id
|
|
187
|
-
|
|
188
170
|
```
|
|
@@ -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,
|
|
10
|
+
from xync_schema.enums import ExType, AdStatus, AssetType, OrderStatus, ExAction
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class Country(Model):
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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=
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
type_:
|
|
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.
|
|
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
|
```
|
|
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
|