xync-schema 0.6.36.dev4__py3-none-any.whl → 0.6.37__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.
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.1
2
+ Name: xync-schema
3
+ Version: 0.6.37
4
+ Summary: XyncNet project database model schema
5
+ Author-email: Mike Artemiev <mixartemev@gmail.com>
6
+ License: EULA
7
+ Project-URL: Homepage, https://gitlab.com/xync/back/schema
8
+ Project-URL: Repository, https://gitlab.com/xync/back/schema
9
+ Requires-Python: >=3.12
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: xtg-auth
12
+ Provides-Extra: dev
13
+ Requires-Dist: build ; extra == 'dev'
14
+ Requires-Dist: pytest-asyncio ; extra == 'dev'
15
+ Requires-Dist: twine ; extra == 'dev'
16
+
17
+ ## INSTALL
18
+ ```bash
19
+ # Create python virtual environment
20
+ python3 -m venv venv
21
+ # Activate this environment
22
+ source venv/bin/activate
23
+ # Install dependencies
24
+ pip install -r requirements.dev.txt
25
+
26
+ # Create pg db
27
+ createdb --U username -W dbname
28
+ ## set password for db user
29
+
30
+ # Copy .env file from sample template
31
+ cp .env.sample .env
32
+ ## set your pg creds in .env file
33
+ ```
34
+
35
+ ## TEST
36
+ ```bash
37
+ pytest
38
+ ```
39
+
40
+
41
+ ### pre-commit
42
+ You can done `commit` only after `pytest` will done success.
43
+ Pre-commit script stored in `.git/hooks/pre-commit` file; current script is:
44
+ ```shell
45
+ #!/bin/sh
46
+ pytest
47
+ ```
48
+
49
+ ### Relations
50
+ ```mermaid
51
+ classDiagram
52
+ direction BT
53
+ class Agent {
54
+ timestamp(0) with time zone created_at
55
+ timestamp(0) with time zone updated_at
56
+ integer exid
57
+ jsonb auth
58
+ smallint ex_id
59
+ bigint user_id
60
+ integer id
61
+ }
62
+ class Asset {
63
+ smallint type_ /* spot: 1\nearn: 2\nfound: 3 */
64
+ double precision free
65
+ double precision freeze
66
+ double precision lock
67
+ double precision target
68
+ integer agent_id
69
+ smallint coin_id
70
+ integer id
71
+ }
72
+ class Coin {
73
+ varchar(15) ticker
74
+ double precision rate
75
+ boolean is_fiat
76
+ smallint id
77
+ }
78
+ class CoinEx {
79
+ varchar(31) exid
80
+ boolean p2p
81
+ smallint coin_id
82
+ smallint ex_id
83
+ integer id
84
+ }
85
+ class Country {
86
+ integer code
87
+ varchar(3) short
88
+ varchar(63) name
89
+ smallint cur_id
90
+ smallint id
91
+ }
92
+ class Cur {
93
+ varchar(3) ticker
94
+ double precision rate
95
+ varchar(63) country
96
+ smallint id
97
+ }
98
+ class CurEx {
99
+ varchar(31) exid
100
+ boolean p2p
101
+ smallint cur_id
102
+ smallint ex_id
103
+ integer id
104
+ }
105
+ class CurExCountry {
106
+ integer curexs
107
+ smallint country_id
108
+ }
109
+ class Ex {
110
+ varchar(31) name
111
+ varchar(63) host /* With no protocol 'https://' */
112
+ varchar(63) host_p2p /* With no protocol 'https://' */
113
+ varchar(63) url_login /* With no protocol 'https://' */
114
+ smallint type_ /* p2p: 1\ncex: 2\nmain: 3\ndex: 4\nfutures: 8 */
115
+ varchar(511) logo
116
+ smallint id
117
+ }
118
+ class Fiat {
119
+ varchar(127) detail
120
+ varchar(127) name
121
+ double precision amount
122
+ double precision target
123
+ smallint country_id
124
+ integer pmcur_id
125
+ bigint user_id
126
+ integer id
127
+ }
128
+ class FiatEx {
129
+ integer exid
130
+ smallint ex_id
131
+ integer fiat_id
132
+ integer id
133
+ }
134
+ class Limit {
135
+ integer amount
136
+ integer unit
137
+ integer level
138
+ boolean income
139
+ bigint added_by_id
140
+ integer pmcur_id
141
+ integer id
142
+ }
143
+ class Pm {
144
+ varchar(63) name
145
+ smallint rank
146
+ smallint type_ /* bank: 0\nweb_wallet: 1\ncash: 2\ngift_card: 3\ncredit_card: 4 */
147
+ varchar(127) logo
148
+ boolean multiAllow
149
+ integer id
150
+ }
151
+ class PmCur {
152
+ smallint cur_id
153
+ integer pm_id
154
+ integer id
155
+ }
156
+ class PmCurEx {
157
+ boolean blocked
158
+ smallint ex_id
159
+ integer pmcur_id
160
+ integer id
161
+ }
162
+ class PmEx {
163
+ varchar(31) exid
164
+ smallint ex_id
165
+ integer pm_id
166
+ integer id
167
+ }
168
+ class User {
169
+ timestamp(0) with time zone created_at
170
+ timestamp(0) with time zone updated_at
171
+ smallint role /* READER: 4\nWRITER: 2\nMANAGER: 6\nADMIN: 7 */
172
+ smallint status /* CREATOR: 5\nADMINISTRATOR: 4\nMEMBER: 3\nRESTRICTED: 2\nLEFT:... */
173
+ varchar(95) username
174
+ bigint ref_id
175
+ bigint id
176
+ }
177
+
178
+ Agent --> Ex : ex_id-id
179
+ Agent --> User : user_id-id
180
+ Asset --> Agent : agent_id-id
181
+ Asset --> Coin : coin_id-id
182
+ CoinEx --> Coin : coin_id-id
183
+ CoinEx --> Ex : ex_id-id
184
+ Country --> Cur : cur_id-id
185
+ CurEx --> Cur : cur_id-id
186
+ CurEx --> Ex : ex_id-id
187
+ CurExCountry --> Country : country_id-id
188
+ CurExCountry --> CurEx : curexs-id
189
+ Fiat --> Country : country_id-id
190
+ Fiat --> PmCur : pmcur_id-id
191
+ Fiat --> User : user_id-id
192
+ FiatEx --> Ex : ex_id-id
193
+ FiatEx --> Fiat : fiat_id-id
194
+ Limit --> PmCur : pmcur_id-id
195
+ Limit --> User : added_by_id-id
196
+ PmCur --> Cur : cur_id-id
197
+ PmCur --> Pm : pm_id-id
198
+ PmCurEx --> Ex : ex_id-id
199
+ PmCurEx --> PmCur : pmcur_id-id
200
+ PmEx --> Ex : ex_id-id
201
+ PmEx --> Pm : pm_id-id
202
+ User --> User : ref_id-id
203
+
204
+ ```
@@ -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=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,,
@@ -1,47 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: xync-schema
3
- Version: 0.6.36.dev4
4
- Summary: XyncNet project database model schema
5
- Author-email: Mike Artemiev <mixartemev@gmail.com>
6
- License: EULA
7
- Project-URL: Homepage, https://gitlab.com/xync/back/schema
8
- Project-URL: Repository, https://gitlab.com/xync/back/schema
9
- Requires-Python: >=3.12
10
- Description-Content-Type: text/markdown
11
- Requires-Dist: xtg-auth
12
- Provides-Extra: dev
13
- Requires-Dist: build ; extra == 'dev'
14
- Requires-Dist: pytest-asyncio ; extra == 'dev'
15
- Requires-Dist: twine ; extra == 'dev'
16
-
17
- ## INSTALL
18
- ```bash
19
- # Create python virtual environment
20
- python3 -m venv venv
21
- # Activate this environment
22
- source venv/bin/activate
23
- # Install dependencies
24
- pip install -r requirements.dev.txt
25
-
26
- # Create pg db
27
- createdb --U username -W dbname
28
- ## set password for db user
29
-
30
- # Copy .env file from sample template
31
- cp .env.sample .env
32
- ## set your pg creds in .env file
33
- ```
34
-
35
- ## TEST
36
- ```bash
37
- pytest
38
- ```
39
-
40
-
41
- ### pre-commit
42
- You can done `commit` only after `pytest` will done success.
43
- Pre-commit script stored in `.git/hooks/pre-commit` file; current script is:
44
- ```shell
45
- #!/bin/sh
46
- pytest
47
- ```
@@ -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.36.dev4.dist-info/METADATA,sha256=IUQNxQiWCi4OTgIw2weBWFIlIeqO-RgGmnatwGJBNaQ,1099
6
- xync_schema-0.6.36.dev4.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
7
- xync_schema-0.6.36.dev4.dist-info/top_level.txt,sha256=jN8IBDfVY8b85Byyk8v0Gyj_0yLB8FO56WV4EvcXWY4,12
8
- xync_schema-0.6.36.dev4.dist-info/RECORD,,