-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.py
More file actions
24 lines (17 loc) · 773 Bytes
/
Copy pathmodel.py
File metadata and controls
24 lines (17 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from sqlalchemy import create_engine, Integer, String
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, Session
# 1. Define base model
class Base(DeclarativeBase):
pass
# 2. Define your table as a Python class
class JobAd(Base):
__tablename__ = "job_ads"
id: Mapped[int] = mapped_column(Integer, primary_key=True)
jobadid: Mapped[int] = mapped_column(Integer)
job_title: Mapped[str] = mapped_column(String)
company_name: Mapped[str] = mapped_column(String)
job_loc: Mapped[str] = mapped_column(String)
job_type: Mapped[str] = mapped_column(String)
job_post_date: Mapped[str] = mapped_column(String)
job_salary_text: Mapped[str] = mapped_column(String)
job_description: Mapped[str] = mapped_column(String)