from django.db import models # Create your models here. class Todo(models.Model): title = models.CharField(max_length=100) description = models.TextField() frequency = models.IntegerField() due_date = models.DateField() assigned_to = models.ForeignKey('auth.User', on_delete=models.CASCADE, null=True, blank=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) completed = models.BooleanField(default=False) completed_at = models.DateTimeField(null=True, blank=True) def __str__(self): return self.title class User(models.Model): username = models.CharField(max_length=100) email = models.EmailField(unique=True) password = models.CharField(max_length=100) def __str__(self): return self.username