
- Complete FastAPI backend with SQLite database
- AI-powered resume parsing and job matching using OpenAI
- JWT authentication with role-based access control
- Resume upload, job management, and matching endpoints
- Recruiter dashboard with candidate ranking
- Analytics and skill gap analysis features
- Comprehensive API documentation with OpenAPI
- Alembic database migrations
- File upload support for PDF, DOCX, and TXT resumes
- CORS enabled for frontend integration
🤖 Generated with BackendIM
Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
from sqlalchemy import Column, Integer, String, Boolean, DateTime, Enum
|
|
from sqlalchemy.sql import func
|
|
from sqlalchemy.orm import relationship
|
|
from app.db.base import Base
|
|
import enum
|
|
|
|
|
|
class UserRole(enum.Enum):
|
|
APPLICANT = "applicant"
|
|
RECRUITER = "recruiter"
|
|
ADMIN = "admin"
|
|
|
|
|
|
class User(Base):
|
|
__tablename__ = "users"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
email = Column(String, unique=True, index=True, nullable=False)
|
|
hashed_password = Column(String, nullable=False)
|
|
full_name = Column(String, nullable=False)
|
|
role = Column(Enum(UserRole), default=UserRole.APPLICANT)
|
|
is_active = Column(Boolean, default=True)
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|
|
|
|
# Relationships
|
|
resumes = relationship("Resume", back_populates="user")
|
|
jobs = relationship("Job", back_populates="recruiter")
|
|
matches = relationship("Match", back_populates="user")
|
|
analytics = relationship("Analytics", back_populates="user") |