This commit is contained in:
Marek Lenczewski
2026-04-07 16:13:16 +02:00
parent 52c4e5f33d
commit 8f15f51bce
32 changed files with 212 additions and 196 deletions

15
backend/model/profile.py Normal file
View File

@@ -0,0 +1,15 @@
from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import Session
from database.database import Base
class Profile(Base):
__tablename__ = "profiles"
id = Column(Integer, primary_key=True, autoincrement=True)
name = Column(String, nullable=False, unique=True)
@classmethod
def get_all(cls, db: Session) -> list["Profile"]:
return db.query(cls).all()