from uuid import uuid4

from django.db import models
from django.utils.translation import gettext_lazy as _, pgettext_lazy


class Bird(models.Model):
    """
    Bird definition.

    """

    uuid = models.UUIDField(default=uuid4, verbose_name=_("UUID"))
    vernacular_name = models.CharField(max_length=64, unique=True, verbose_name=_("vernacular name"))
    scientific_name = models.CharField(max_length=64, unique=True, verbose_name=_("scientific name"))
    weight = models.PositiveIntegerField(default=100, verbose_name=_("weight"))
    is_extinct = models.BooleanField(default=False, verbose_name=pgettext_lazy("bird (adjective)", "extinct"))

    class Meta:
        verbose_name = _("bird")
        verbose_name_plural = _("birds")
        app_label = "birds"
