add org_type_field to oragnization type serializer

This commit is contained in:
2025-10-28 16:48:19 +03:30
parent b0b6e5734d
commit b914efd1fb
4 changed files with 35 additions and 0 deletions

View File

@@ -85,6 +85,11 @@ class OrganizationType(BaseModel):
key = models.CharField(choices=organization_keys, default='EMP', max_length=3)
name = models.CharField(max_length=50, unique=True, null=True)
code = models.IntegerField(default=0)
org_type_field = models.CharField(choices=[
('CI', 'city'),
('CO', 'country'),
('PR', 'province'),
], max_length=25, null=True)
def __str__(self):
return f'{self.key}-{self.name}'