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

# Create your models here.
class Post(models.Model):
    title = models.CharField(max_length=255)
    author = models.ForeignKey(User, on_delete = models.CASCADE)
    slug=models.CharField(max_length=130)
    timeStamp=models.DateTimeField(blank=True)
    body = models.TextField()

    def __str__(self):
        return self.title + ' | ' + str(self.author)


