Removed task model

This commit is contained in:
Marcin-Ramotowski 2025-03-19 20:56:15 +01:00
parent 90a7a8a72c
commit 31480c5c55

View File

@ -15,24 +15,3 @@ class User(db.Model):
@staticmethod
def get_editable_fields():
return {"username", "email", "role", "password"}
class Task(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
title = db.Column(db.String(100), nullable=False)
description = db.Column(db.Text)
done = db.Column(db.Boolean, default=False)
due_date = db.Column(db.DateTime)
user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
def to_dict(self):
return {
"id": self.id,
"title": self.title,
"description": self.description,
"due_date": self.due_date,
"done": self.done,
}
@staticmethod
def get_editable_fields():
return {"title", "description", "due_date", "done"}