Spaces:
Sleeping
Sleeping
Download PlatformService/models.py from dellweb3/workos-office: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/spaces/dellweb3/workos-office/resolve/main/PlatformService/models.py
- Command line
-
hf download hf://spaces/dellweb3/workos-office/PlatformService/models.py
-
curl -L -o models.py https://huggingface.co/spaces/dellweb3/workos-office/resolve/main/PlatformService/models.py
1.73 kB
| from sqlalchemy import String, Integer, JSON, Text, UniqueConstraint | |
| from sqlalchemy.orm import Mapped, mapped_column | |
| from KnowledgeService.models import Base | |
| class Resource(Base): | |
| __tablename__='platform_resource' | |
| tenant:Mapped[str]=mapped_column(String(80),primary_key=True) | |
| owner:Mapped[str]=mapped_column(String(80),primary_key=True) | |
| kind:Mapped[str]=mapped_column(String(32),primary_key=True) | |
| id:Mapped[str]=mapped_column(String(80),primary_key=True) | |
| revision:Mapped[int]=mapped_column(Integer) | |
| body:Mapped[dict]=mapped_column(JSON) | |
| updated_at:Mapped[str]=mapped_column(String(40)) | |
| class Schedule(Base): | |
| __tablename__='platform_schedule' | |
| id:Mapped[str]=mapped_column(String(80),primary_key=True) | |
| tenant:Mapped[str]=mapped_column(String(80),index=True) | |
| owner:Mapped[str]=mapped_column(String(80),index=True) | |
| revision:Mapped[int]=mapped_column(Integer) | |
| body:Mapped[dict]=mapped_column(JSON) | |
| status:Mapped[str]=mapped_column(String(24)) | |
| next_at:Mapped[str|None]=mapped_column(String(40),index=True) | |
| updated_at:Mapped[str]=mapped_column(String(40)) | |
| class ScheduledRun(Base): | |
| __tablename__='platform_scheduled_run' | |
| id:Mapped[str]=mapped_column(String(80),primary_key=True) | |
| schedule_id:Mapped[str]=mapped_column(String(80),index=True) | |
| tenant:Mapped[str]=mapped_column(String(80)) | |
| owner:Mapped[str]=mapped_column(String(80)) | |
| slot:Mapped[str]=mapped_column(String(80)) | |
| status:Mapped[str]=mapped_column(String(24)) | |
| result:Mapped[dict]=mapped_column(JSON) | |
| created_at:Mapped[str]=mapped_column(String(40)) | |
| __table_args__=(UniqueConstraint('schedule_id','slot',name='uq_schedule_slot'),) | |