migration repaire

This commit is contained in:
javad committed 2026-10-08 18:09:12 +03:30
1 parent c8d45dd07c
commit 56d8760613
11 files changed
+492 -5064

No files matched your search

+20
View File
@@ -4,9 +4,29 @@ from apps.workspace.models import City as CityModel, Workspace as WorkspaceModel
from apps.cuser.models import CuserRole as CuserRoleModel
from django.core.exceptions import ValidationError
from utils.validations.mobile import normalize_mobile
from django.utils import timezone
# Create your models here.
class MobileConflict(models.Model):
source_model = models.CharField(max_length=100)
record_id = models.PositiveBigIntegerField()
workspace_id = models.PositiveBigIntegerField(null=True, blank=True)
original_mobile = models.PositiveBigIntegerField(null=True, blank=True)
canonical_mobile = models.PositiveBigIntegerField()
snapshot = models.JSONField()
created_at = models.DateTimeField(default=timezone.now, editable=False)
class Meta:
ordering = ['-created_at', '-pk']
unique_together = (('source_model', 'record_id'),)
verbose_name = 'تعارض شماره قدیمی'
verbose_name_plural = 'تعارض‌های شماره قدیمی'
def __str__(self):
return f'{self.source_model} #{self.record_id}: {self.original_mobile}'
class ShiveAshenaei(BaseModel):
name = models.CharField(max_length=15, null=False, blank=False)
sys_ws = models.ForeignKey(WorkspaceModel, on_delete=models.CASCADE, null=False, blank=False)