graphql_python_template/app/models/todo.py
2020-10-22 13:07:38 +02:00

14 lines
372 B
Python

from uuid import uuid4
class Todo:
def __init__(self,
todo_id: str = None,
title: str = '',
is_done: bool = False):
self.todo_id = todo_id or str(uuid4())
self.title = title
self.is_done = is_done
def __repr__(self):
return f"Todo: {self.todo_id}, {self.title}, {self.is_done}"