# Generated by Django 5.0 on 2025-08-16 10:08

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0033_organization_en_name_alter_organization_name'),
        ('pos_device', '0054_alter_deviceactivationcode_expires_at'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterField(
            model_name='posclient',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='client', to='authentication.organization'),
        ),
        migrations.AddConstraint(
            model_name='deviceassignment',
            constraint=models.UniqueConstraint(fields=('client', 'device'), name='unique_assign_client_device', violation_error_code=403, violation_error_message='این کلاینت با همین دستگاه قبلا تخصیص داده شده است'),
        ),
    ]
