change keys of organization type, import search field to users

This commit is contained in:
2025-07-07 09:31:46 +03:30
parent 848e0caccb
commit 65b6b3f3f3
4 changed files with 42 additions and 2 deletions

View File

@@ -75,13 +75,14 @@ class City(BaseModel):
class OrganizationType(BaseModel):
organization_keys = (
('EMP', 'empty'),
('J', 'Jihad'),
('U', 'Union'),
('CO', 'Cooperative'),
('CMP', 'Companies')
)
key = models.CharField(choices=organization_keys, max_length=3)
name = models.CharField(max_length=50, null=True)
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)
def __str__(self):