Skip to content
Merged

Test #44

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions depsec_db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ class Project(db.Model):
titre = db.Column(db.String, nullable=False)
status = db.Column(db.String, nullable=False)
path = db.Column(db.String, nullable=False)
def to_dict(self):
"""Function to return projects as JSON"""
return {
"id": self.id,
"auteur_id": self.auteur_id,
"titre": self.titre,
"status": self.status,
"path": self.path
}

class User(db.Model):
"""Modèle utilisateur principal pour l'authentification."""
Expand Down