-
Notifications
You must be signed in to change notification settings - Fork 6
/
models.py
34 lines (27 loc) · 980 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# models.py
from sqlalchemy import Column, String, BigInteger, Boolean, ForeignKey, Integer, Text
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class Pair(Base):
__tablename__ = "pairs"
launcher_id = Column(String(64), primary_key=True)
asset_id = Column(String(64))
liquidity_asset_id = Column(String(64))
xch_reserve = Column(BigInteger)
token_reserve = Column(BigInteger)
liquidity = Column(BigInteger)
last_coin_id_on_chain = Column(String(64))
class Token(Base):
__tablename__ = "tokens"
asset_id = Column(String(64), primary_key=True)
pair_id = Column(String(64))
name = Column(Text)
short_name = Column(Text)
image_url = Column(Text)
verified = Column(Boolean)
class Router(Base):
__tablename__ = "router"
launcher_id = Column(String(64), primary_key=True)
current_id = Column(String(64))
network = Column(String)