-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtables.py
More file actions
21 lines (19 loc) · 714 Bytes
/
Copy pathtables.py
File metadata and controls
21 lines (19 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from sqlalchemy import Column, Integer, String, JSON,Float, ForeignKey,Boolean
from database import Base
from sqlalchemy.orm import relationship #use this to make relationships between user and products, see that part again
class City(Base):
__tablename__='cities'
id=Column(Integer,primary_key=True,index=True)
name=Column(String)
lat=Column(Float)
long=Column(Float)
stores = Column(JSON) # JSON column for station details
airports=Column(JSON)
stations=Column(JSON)
clusters=Column(JSON) # k means cluster centers
malls=Column(JSON)
hospitals=Column(JSON)
schools=Column(JSON)
markets=Column(JSON)
hotels=Column(JSON)
restaurants=Column(JSON)