kop narsalar qoshildi

This commit is contained in:
behruz-dev
2025-11-22 16:17:06 +05:00
parent 6d8f5e3fec
commit 7723aad146
11 changed files with 212 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
from django.db import models
# shared
from core.apps.shared.models import BaseModel
# accounts
from core.apps.accounts.models import User
class District(BaseModel):
name = models.CharField(max_length=200, unique=True)
user = models.ForeignKey(
User, on_delete=models.CASCADE, related_name='districts', null=True
)
def __str__(self):
return self.name