Spaces:
Sleeping
Sleeping
Download app/models/application.py from abdullah090809/Job_Tracker_API: direct link, hf CLI and curl.
- Browser
- Download file 986 Bytes
-
https://huggingface.co/spaces/abdullah090809/Job_Tracker_API/resolve/main/app/models/application.py
- Command line
-
hf download hf://spaces/abdullah090809/Job_Tracker_API/app/models/application.py
-
curl -L -o application.py https://huggingface.co/spaces/abdullah090809/Job_Tracker_API/resolve/main/app/models/application.py
986 Bytes
| import enum | |
| from sqlalchemy import Column, Date, DateTime, Enum, ForeignKey, Integer, String, Text, func | |
| from app.cores.database import Base | |
| from sqlalchemy.orm import relationship | |
| class ApplicationStatus(str, enum.Enum): | |
| applied = "applied" | |
| interview = "interview" | |
| offer = "offer" | |
| rejected = "rejected" | |
| class Application(Base): | |
| __tablename__ = "applications" | |
| id = Column(Integer, primary_key=True, nullable=False) | |
| user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE"), nullable=False) | |
| company = Column(String, nullable=False) | |
| role = Column(String, nullable=False) | |
| status = Column(Enum(ApplicationStatus), nullable=False, default=ApplicationStatus.applied) | |
| applied_date = Column(Date, nullable=False) | |
| jd_text = Column(Text, nullable=True) | |
| notes = Column(Text, nullable=True) | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| owner = relationship("User", back_populates="applications") |