File size: 680 Bytes
f3f0a69
 
 
2600a8c
f3f0a69
 
2600a8c
f3f0a69
 
 
 
 
 
 
 
 
 
 
2600a8c
f3f0a69
e11a248
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from sqlalchemy import create_engine, Column, Integer, String, Text
from sqlalchemy.orm import sessionmaker, declarative_base
from config import DATABASE_URL  # Import from config.py

# Set up SQLAlchemy
Base = declarative_base()
engine = create_engine(DATABASE_URL)
SessionLocal = sessionmaker(bind=engine)

# Define Candidate Model
class Candidate(Base):
    __tablename__ = "candidates"
    id = Column(Integer, primary_key=True, index=True)
    name = Column(String, index=True)
    score = Column(Integer)
    summary = Column(Text)
    resume_text = Column(Text)
    pdf_link = Column(String)

# Create tables
Base.metadata.create_all(bind=engine)

# add email to the schema