-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
32 lines (23 loc) · 1000 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
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String , DateTime ,Time
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.mysql import VARCHAR
from database import Base
class Storerecords(Base):
__tablename__ = "Storerecords"
store_id = Column(String, primary_key=True, index=True)
status = Column(String)
timestamp = Column(DateTime,primary_key=True)
class StoreWorkingHours(Base):
__tablename__ = "StoreWorkingHours"
store_id = Column(String, primary_key=True, index=True)
day = Column(Integer,primary_key=True, index=True)
start_time = Column(Time,primary_key=True)
end_time = Column(Time)
class Timezones(Base):
__tablename__ = "Timezones"
store_id = Column(String, primary_key=True, index=True)
timezone = Column(String,default="America/Chicago")
class Status(Base):
__tablename__ = "Status"
report_id = Column(String,primary_key=True)
status = Column(String,default="Running")