49 lines
779 B
Python
49 lines
779 B
Python
from sqlalchemy import (
|
|
Column,
|
|
Integer,
|
|
String,
|
|
ForeignKey
|
|
)
|
|
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.database import Base
|
|
|
|
|
|
class ExperienceLink(Base):
|
|
__tablename__ = "experience_links"
|
|
|
|
id = Column(
|
|
Integer,
|
|
primary_key=True,
|
|
index=True
|
|
)
|
|
|
|
label = Column(
|
|
String(255),
|
|
nullable=False
|
|
)
|
|
|
|
link = Column(
|
|
String(255),
|
|
nullable=False
|
|
)
|
|
|
|
icon_path = Column(
|
|
String(255),
|
|
nullable=False
|
|
)
|
|
|
|
experience_id = Column(
|
|
Integer,
|
|
ForeignKey(
|
|
"experiences.id",
|
|
ondelete="CASCADE"
|
|
),
|
|
nullable=False
|
|
)
|
|
|
|
experience = relationship(
|
|
"Experience",
|
|
back_populates="links"
|
|
) |