from sqlalchemy import ( Column, Integer, String, Text, Boolean ) from sqlalchemy.orm import relationship from app.database import Base from app.models.project_skill import project_skills class Project(Base): __tablename__ = "projects" id = Column(Integer, primary_key=True, index=True) title = Column( String(255), nullable=False ) nb_image = Column( Integer, default=1 ) short_description = Column( Text, nullable=False ) image_name = Column( String(255), nullable=False, default="empty" ) school = Column( Boolean, nullable=False ) long_description = Column( Text, nullable=False ) repo_link = Column( String(255), nullable=True ) beginning_year = Column( Integer, nullable=False ) end_year = Column( Integer, nullable=True ) skills = relationship( "Skill", secondary=project_skills, back_populates="projects" )