from django.db import models
from django.conf import settings

class Cluster(models.Model):
    title = models.CharField(max_length=50, unique=True)
    uuid = models.TextField(null=True, blank=True)
    content = models.TextField(null=True, blank=True)
    type = models.CharField(max_length=50, blank=True, unique=True)

    created_at = models.DateTimeField(auto_now=True)
    updated_at = models.DateTimeField(auto_now=True)


    author = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)
    
    def __str__(self):
        return f'[{self.pk}] {self.title}'