Created Cally
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean, Date, DateTime
|
||||
from sqlalchemy.sql import func
|
||||
from .cally_database import Base
|
||||
|
||||
class Sm8Staff(Base):
|
||||
__tablename__ = "sm8_staff"
|
||||
uuid = Column(String, primary_key=True)
|
||||
name = Column(String, nullable=False)
|
||||
active = Column(Boolean, default=True)
|
||||
|
||||
class Sm8Job(Base):
|
||||
__tablename__ = "sm8_jobs"
|
||||
uuid = Column(String, primary_key=True)
|
||||
job_id = Column(String, nullable=False) # e.g. #1234
|
||||
address = Column(String)
|
||||
|
||||
class ScheduleDay(Base):
|
||||
__tablename__ = "schedule_days"
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
staff_uuid = Column(String, nullable=False)
|
||||
date = Column(Date, nullable=False)
|
||||
is_busy = Column(Boolean, default=False)
|
||||
job_count = Column(Integer, default=0)
|
||||
job_uuids = Column(String) # Comma-separated list of job UUIDs
|
||||
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
Reference in New Issue
Block a user