Skip to main content

XyncNet project database model schema

Project description

INSTALL

# Create python virtual environment
python3 -m venv venv
# Activate this environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.dev.txt

# Create pg db
createdb --U username -W dbname
## set password for db user

# Copy .env file from sample template
cp .env.sample .env
## set your pg creds in .env file

TEST

pytest

pre-commit

You can done commit only after pytest will done success. Pre-commit script stored in .git/hooks/pre-commit file; current script is:

#!/bin/sh
pytest

Relations

classDiagram
direction BT
class Agent {
   timestamp(0) with time zone created_at
   timestamp(0) with time zone updated_at
   integer exid
   jsonb auth
   smallint ex_id
   bigint user_id
   integer id
}
class Asset {
   smallint type_  /* spot: 1\nearn: 2\nfound: 3 */
   double precision free
   double precision freeze
   double precision lock
   double precision target
   integer agent_id
   smallint coin_id
   integer id
}
class Coin {
   varchar(15) ticker
   double precision rate
   boolean is_fiat
   smallint id
}
class CoinEx {
   varchar(31) exid
   boolean p2p
   smallint coin_id
   smallint ex_id
   integer id
}
class Cur {
   varchar(3) ticker
   double precision rate
   smallint id
}
class CurEx {
   varchar(31) exid
   boolean p2p
   smallint cur_id
   smallint ex_id
   integer id
}
class Ex {
   varchar(31) name
   varchar(63) host  /* With no protocol 'https://' */
   varchar(63) host_p2p  /* With no protocol 'https://' */
   varchar(63) url_login  /* With no protocol 'https://' */
   smallint type_  /* p2p: 1\ncex: 2\nmain: 3\ndex: 4\nfutures: 8 */
   varchar(511) logo
   smallint id
}
class Fiat {
   varchar(127) detail
   varchar(127) name
   double precision amount
   double precision target
   integer pmcur_id
   bigint user_id
   integer id
}
class FiatEx {
   integer exid
   smallint ex_id
   integer fiat_id
   integer id
}
class Limit {
   integer amount
   integer unit
   integer level
   boolean income
   bigint added_by_id
   integer pmcur_id
   integer id
}
class Pm {
   varchar(63) name
   smallint rank
   smallint type_  /* bank: 0\nweb_wallet: 1\ncash: 2\ngift_card: 3\ncredit_card: 4 */
   varchar(127) logo
   boolean multiAllow
   integer id
}
class PmCur {
   smallint cur_id
   integer pm_id
   integer id
}
class PmCurEx {
   boolean blocked
   smallint ex_id
   integer pmcur_id
   integer id
}
class PmEx {
   varchar(31) exid
   smallint ex_id
   integer pm_id
   integer id
}
class User {
   timestamp(0) with time zone created_at
   timestamp(0) with time zone updated_at
   smallint role  /* READER: 4\nWRITER: 2\nMANAGER: 6\nADMIN: 7 */
   smallint status  /* CREATOR: 5\nADMINISTRATOR: 4\nMEMBER: 3\nRESTRICTED: 2\nLEFT:... */
   varchar(95) username
   bigint ref_id
   bigint id
}

Agent  -->  Ex : ex_id-id
Agent  -->  User : user_id-id
Asset  -->  Agent : agent_id-id
Asset  -->  Coin : coin_id-id
CoinEx  -->  Coin : coin_id-id
CoinEx  -->  Ex : ex_id-id
CurEx  -->  Cur : cur_id-id
CurEx  -->  Ex : ex_id-id
Fiat  -->  PmCur : pmcur_id-id
Fiat  -->  User : user_id-id
FiatEx  -->  Ex : ex_id-id
FiatEx  -->  Fiat : fiat_id-id
Limit  -->  PmCur : pmcur_id-id
Limit  -->  User : added_by_id-id
PmCur  -->  Cur : cur_id-id
PmCur  -->  Pm : pm_id-id
PmCurEx  -->  Ex : ex_id-id
PmCurEx  -->  PmCur : pmcur_id-id
PmEx  -->  Ex : ex_id-id
PmEx  -->  Pm : pm_id-id
User  -->  User : ref_id-id

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xync_schema-0.6.40.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

xync_schema-0.6.40-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file xync_schema-0.6.40.tar.gz.

File metadata

  • Download URL: xync_schema-0.6.40.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for xync_schema-0.6.40.tar.gz
Algorithm Hash digest
SHA256 2a35d2a67bd5233143a00fe3b93f26fd23e5e1ad457d19bfa65e9ef64bb9193d
MD5 9e45bb99b3c2a83c9e2233bde5aabed0
BLAKE2b-256 3111725024970194a52a5c8952e059fe7594ee4603990668e00a392351be32bc

See more details on using hashes here.

File details

Details for the file xync_schema-0.6.40-py3-none-any.whl.

File metadata

  • Download URL: xync_schema-0.6.40-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for xync_schema-0.6.40-py3-none-any.whl
Algorithm Hash digest
SHA256 2a18878eb1a53bc49052aa3b651a01b88316efe38517d89fecaf0e6874f96b9a
MD5 d96ee4f624c6b4f0fe1a7676d1b1172b
BLAKE2b-256 513e01e2bae3398f9f659e507986532cc10780da8007482e1e82e1174b95f4c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page