# Generated by Django 5.2.6 on 2025-09-11 18:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('customers', '0004_alter_customer_phone'),
        ('tenants', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='customer',
            name='tenant',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='tenants.tenant'),
        ),
        migrations.AlterField(
            model_name='customer',
            name='customer_id',
            field=models.CharField(editable=False, max_length=10),
        ),
        migrations.AlterField(
            model_name='customer',
            name='phone',
            field=models.CharField(max_length=15),
        ),
        migrations.AddConstraint(
            model_name='customer',
            constraint=models.UniqueConstraint(fields=('tenant', 'phone'), name='unique_customer_phone_per_tenant'),
        ),
        migrations.AddConstraint(
            model_name='customer',
            constraint=models.UniqueConstraint(fields=('tenant', 'customer_id'), name='unique_customer_id_per_tenant'),
        ),
    ]
