# Generated by uml2django - 
# https://steelkiwi.com/blog/best-practices-working-django-models-python/
# https://learndjango.com/tutorials/django-best-practices-models
from django.db import models
from django.utils.translation import gettext_lazy as _
from django.urls import reverse

class Building(
    models.Model
):
    name = models.CharField(
        max_length=255,
        unique=True,
        verbose_name=_('name'),
        help_text=_('name help text'),
    )

    slug = models.SlugField(null=False, unique=True) 

    class Meta:
        verbose_name = _("building")
        verbose_name_plural = _("buildings")

    # def __str__(self): 
    #     return self.

    def get_absolute_url(self):
        return reverse("building-detail", args=[str(self.id)])
