#51 feat: agregar descripcion, nombre alternativo y activo a categorias de productos

Issue #51: discriminacion y administracion de categorias de productos.

- ProductCategory.description (TextField blank)
- ProductCategory.alternative_name (CharField 100 nullable)
- ProductCategory.active (Boolean default True)
- Migracion 0056_productcategory_active_and_more
- Tests de modelo (campo don confiao y active por defecto)
This commit is contained in:
2026-10-10 16:27:49 -05:00
parent 53cc333c19
commit 570fec0532
3 changed files with 56 additions and 0 deletions

View File

@@ -9,6 +9,9 @@ class MeasuringUnits(models.TextChoices):
class ProductCategory(models.Model):
name = models.CharField(max_length=100, unique=True)
external_id = models.CharField(max_length=100, null=True, blank=True)
description = models.TextField(blank=True, default="")
alternative_name = models.CharField(max_length=100, null=True, blank=True)
active = models.BooleanField(default=True)
def __str__(self):
return self.name