-
Notifications
You must be signed in to change notification settings - Fork 0
/
mixin_sqlalchemy_type.py
83 lines (76 loc) · 3.42 KB
/
mixin_sqlalchemy_type.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class ScannedSnapshots(Base):
__tablename__ = 'scannedsnapshots'
# Here we define columns for the table person
# Notice that each column is also a normal Python instance attribute.
id = Column(Integer, primary_key=True)
snap_amount = Column(String(100))
snap_type = Column(String(100))
snap_created_at = Column(String(64))
snap_asset_name = Column(String(250))
snap_asset_asset_id = Column(String(64))
snap_asset_chain_id = Column(String(64))
snap_asset_symbol = Column(String(250))
snap_snapshot_id = Column(String(64))
def __repr__(self):
return "<Snap (id='%s', created at ='%s')>" % (
self.snap_snapshot_id, self.snap_created_at)
class MySnapshot(Base):
__tablename__ = 'mysnapshot'
# Here we define columns for the table person
# Notice that each column is also a normal Python instance attribute.
id = Column(Integer, primary_key=True)
snap_amount = Column(String(100))
snap_type = Column(String(100))
snap_created_at = Column(String(64))
snap_asset_name = Column(String(250))
snap_asset_asset_id = Column(String(64))
snap_asset_chain_id = Column(String(64))
snap_asset_symbol = Column(String(250))
snap_snapshot_id = Column(String(64))
snap_memo = Column(String(512), nullable=True)
snap_source = Column(String(250), nullable=True)
snap_user_id = Column(String(64), nullable=True)
snap_trace_id = Column(String(64), nullable=True)
snap_opponent_id = Column(String(64), nullable=True)
def __repr__(self):
return "<Snap (id='%s', created at ='%s')>" % (
self.snap_snapshot_id, self.snap_created_at)
class Mixin_asset_record(Base):
__tablename__ = 'mixin_asset_record'
# Here we define columns for the table person
# Notice that each column is also a normal Python instance attribute.
id = Column(Integer, primary_key=True)
asset_id = Column(String(64))
asset_symbol = Column(String(64))
asset_name = Column(String(256))
def __repr__(self):
return "<Asset (id='%s', symbol ='%s', name ='%s')>" % (
self.asset_id, self.asset_symbol, self.asset_name)
class Ocean_trade_record(Base):
__tablename__ = 'ocean_trade_record_list'
# Here we define columns for the table person
# Notice that each column is also a normal Python instance attribute.
id = Column(Integer, primary_key=True)
pay_asset_id = Column(String(64))
pay_asset_amount = Column(String(64))
asset_id = Column(String(64))
price = Column(String(64))
operation_type = Column(String(256))
side = Column(String(64))
order_id = Column(String(64))
def __repr__(self):
return "<Asset (id='%s', symbol ='%s', name ='%s')>" % (
self.asset_id, self.asset_symbol, self.asset_name)
class Main_net_address(Base):
__tablename__ = 'main_net_address'
# Here we define columns for the table person
# Notice that each column is also a normal Python instance attribute.
id = Column(Integer, primary_key=True)
name = Column(String(256))
address = Column(String(256))
def __repr__(self):
return "<Main net address (id='%s', symbol ='%s', name ='%s')>" % (
self.id, self.name, self.address)