category va elonlanri olish optimalashtrildi

This commit is contained in:
2026-04-02 10:49:28 +05:00
parent 2dee1cc1e6
commit 8f6cf5dae3
8 changed files with 52 additions and 5 deletions

View File

@@ -6,6 +6,12 @@ from model_bakery import baker
class TypeModel(AbstractBaseModel):
name = models.CharField(verbose_name=_("name"), max_length=255)
filials = models.ManyToManyField(
"api.FilialModel",
verbose_name=_("filials"),
related_name="types",
blank=True,
)
def __str__(self):
return self.name