# Generated by Django 3.1.3 on 2021-01-25 00:32

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


class Migration(migrations.Migration):

    dependencies = [
        ('tickets', '0002_remove_client_password'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='client',
            options={'ordering': ('second_name', 'first_name')},
        ),
        migrations.AlterModelOptions(
            name='match',
            options={'ordering': ('date',)},
        ),
        migrations.AlterModelOptions(
            name='place',
            options={'ordering': ('sector', 'row', 'number')},
        ),
        migrations.AlterModelOptions(
            name='team',
            options={'ordering': ('name',)},
        ),
        migrations.AlterModelOptions(
            name='ticket',
            options={'ordering': ('id_match', 'id_place')},
        ),
        migrations.AlterField(
            model_name='client',
            name='email',
            field=models.CharField(max_length=45, unique=True),
        ),
        migrations.AlterField(
            model_name='client',
            name='phone_number',
            field=models.CharField(max_length=12, unique=True),
        ),
        migrations.AlterField(
            model_name='match',
            name='id_team1',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='home', to='tickets.team'),
        ),
        migrations.AlterField(
            model_name='match',
            name='id_team2',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='away', to='tickets.team'),
        ),
        migrations.AlterField(
            model_name='ticket',
            name='id_client',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='client_tickets', to='tickets.client'),
        ),
        migrations.AlterField(
            model_name='ticket',
            name='id_match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='match_tickets', to='tickets.match'),
        ),
        migrations.AlterField(
            model_name='ticket',
            name='id_place',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='place_tickets', to='tickets.place'),
        ),
        migrations.AlterField(
            model_name='ticket',
            name='price',
            field=models.FloatField(validators=[django.core.validators.MinValueValidator(0)]),
        ),
    ]
