initialize backend with FastAPI and Docker setup

This commit is contained in:
Giovanni committed 2026-06-03 11:35:09 +02:00
1 parent 5d724e37ab
commit 5ff02c0ff5
24 files changed
+420 -243

No files matched your search

+70
View File
@@ -0,0 +1,70 @@
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"
)