from django.db import models
from django.contrib.auth.models import User
from django.conf import settings

# Create your models here.
class Entry(models.Model):
    entry_title=models.CharField(max_length=50)
    entry_text=models.TextField()
    entry_date=models.DateTimeField(auto_now_add=True)
    entry_author=models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True,on_delete=models.CASCADE)

    class Meta:
        verbose_name_plural="entries"

    def __str__(self):
        return self.entry_title

