from django.db import models

class Tisub(models.Model):
    name = models.CharField(max_length=50)
    descritpion = models.TextField()
    default = models.TextField()

    def __str__(self):
        return self.name

    class Meta:
        verbose_name_plural = "tisubz"


class Tikategory(models.Model):
    name = models.CharField(max_length=50)
    landscape = models.BooleanField()
    subs = models.ManyToManyField(Tisub)

    def __str__(self):
        return self.name

    class Meta:
        verbose_name_plural = "tikategoriez"


class Tikette(models.Model):
    title = models.CharField(max_length=100)
    category = models.ForeignKey(Tikategory, on_delete=models.CASCADE)
    svg = models.FileField()

    def __str__(self):
        return self.title

    class Meta:
        verbose_name_plural = "tikettz"

# Create your models here.
