-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
65 lines (52 loc) · 2.18 KB
/
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
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
from sqlalchemy import Column, ForeignKey, Integer, String, Float, TIMESTAMP, BigInteger
from sqlalchemy.ext.declarative import declarative_base
__author__ = "Wen-Hao Lee"
__email__ = "[email protected]"
__copyright__ = "Copyright 2014, Numnum"
Base = declarative_base()
class Track(Base):
__tablename__ = 'track'
id_ = Column('id', Integer, primary_key=True)
lat = Column('lat', Float(asdecimal=True))
lon = Column('lon', Float(asdecimal=True))
rad = Column('rad', Integer)
found = Column('found', Integer)
saved = Column('saved', Integer)
update_ts = Column('update_ts', TIMESTAMP)
class FBShop(Base):
__tablename__ = 'fb_shop'
fbid = Column('fbid', BigInteger, primary_key=True)
name = Column('name', String(100))
desc = Column('desc', String(900))
phone = Column('phone', String(14))
website = Column('website', String(300))
address = Column('address', String(300))
city = Column('city', String(20))
lat = Column('lat', Float(asdecimal=True))
lon = Column('lon', Float(asdecimal=True))
zipcode = Column('zipcode', Integer)
hours = Column('hours', String(900))
likes = Column('likes', Integer)
checkins = Column('checkins', Integer)
talking = Column('talking', Integer)
price = Column('price', Integer)
track_id = Column('track_id', Integer)
old_fbid = Column('old_fbid', BigInteger)
ggid = Column('ggid', String(50))
update_ts = Column('update_ts', TIMESTAMP)
class GGShop(Base):
__tablename__ = 'gg_shop'
ggid = Column('ggid', String(50), primary_key=True)
name = Column('name', String(100))
phone = Column('phone', String(14))
address = Column('address', String(300))
city = Column('city', String(20))
lat = Column('lat', Float(asdecimal=True))
lon = Column('lon', Float(asdecimal=True))
zipcode = Column('zipcode', Integer)
reference = Column('reference', String(150))
update_ts = Column('update_ts', TIMESTAMP)
class FBShopType(Base):
__tablename__ = 'fb_shop_type'
fbid = Column('fbid', BigInteger, primary_key=True)
type_ = Column('type', String(50), primary_key=True)