from django.db import models

class ToDoItem(models.Model):
    title = models.CharField(max_length = 100)
    task_text = models.TextField(max_length = 200)
    created_at = models.DateTimeField(auto_now_add = True)
    completed = models.BooleanField(default=False)
    completed_at = models.DateTimeField(blank=True, null=True)

    def __str__(self):
        return self.title
