from django.db import models
from django.utils import timezone
from at_django_boilerplate.utils.mixins import UUIDMixin

class Blog(UUIDMixin):
    title = models.CharField(max_length=80,null=True,blank=True)
    content = models.TextField(null=True,blank=True)
    cover_image = models.ImageField(upload_to='blogs',null=True,blank=True)
    meta_title = models.CharField(max_length=80,null=True,blank=True)
    meta_description = models.CharField(max_length=180,null=True,blank=True)
    meta_keywords = models.CharField(max_length=100,null=True,blank=True)
    published_on = models.DateTimeField(auto_created=True,default=timezone.now)
    published_by = models.ForeignKey('accounts.CustomUser',null=True,blank=True,on_delete=models.DO_NOTHING)
    is_draft = models.BooleanField(default=True)
    is_active = models.BooleanField(default=False)


