Spaces:
Running
Running
Download app/persistence/database/models/report_model.py from fallingbody/Mockai: direct link, hf CLI and curl.
- Browser
- Download file 917 Bytes
-
https://huggingface.co/spaces/fallingbody/Mockai/resolve/main/app/persistence/database/models/report_model.py
- Command line
-
hf download hf://spaces/fallingbody/Mockai/app/persistence/database/models/report_model.py
-
curl -L -o report_model.py https://huggingface.co/spaces/fallingbody/Mockai/resolve/main/app/persistence/database/models/report_model.py
917 Bytes
| import uuid | |
| from sqlalchemy import Column, JSON, String | |
| from app.persistence.database.base import Base, GUID, TimestampMixin | |
| class ReportModel(Base, TimestampMixin): | |
| __tablename__ = "interview_reports" | |
| id = Column(GUID(), primary_key=True, default=lambda: str(uuid.uuid4())) | |
| interview_id = Column(GUID(), nullable=False, index=True) | |
| candidate_id = Column(GUID(), nullable=False) | |
| campaign_id = Column(String(255), nullable=False, index=True) | |
| role = Column(String(255), nullable=False) | |
| report_data = Column(JSON, nullable=False) | |
| def to_dict(self): | |
| return { | |
| "id": self.id, # include id if you want | |
| "interview_id": self.interview_id, | |
| "candidate_id": self.candidate_id, | |
| "campaign_id": self.campaign_id, | |
| "role": self.role, | |
| "report": self.report_data, | |
| "created_at": self.created_at, | |
| } | |