You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
436 B

from blueprintapp.app import db
class Todo(db.Model):
__tablename__ = 'todos'
tid = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String, nullable=False)
done = db.Column(db.Boolean, nullable=False)
description = db.Column(db.String, nullable=True)
def __repr__(self):
return f'<ToDo:{self.title}, Done: {self.done}>'
def get_id(self):
return self.uid