# Generated by Django 5.0 on 2025-06-06 10:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0055_employee_clausedescription_alter_contract_uuid_and_more'),
    ]

    operations = [
        migrations.AlterField(
            model_name='contract',
            name='uuid',
            field=models.CharField(blank=True, default=uuid.UUID('22d8871a-e782-44f1-be9b-59782ea24020'), max_length=200, null=True, unique=True),
        ),
        migrations.AlterField(
            model_name='customer',
            name='slug',
            field=models.TextField(blank=True, default=uuid.UUID('00363844-3662-44a0-aaf3-fc142c5c9ea9'), max_length=200),
        ),
        migrations.AlterField(
            model_name='insurancecompany',
            name='slug',
            field=models.TextField(blank=True, default=uuid.UUID('f4bccd5c-53a1-41fb-b050-d8df4fa8a3c2'), max_length=200, unique=True),
        ),
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(100000000.0)], verbose_name='Montant')),
                ('justificative', models.FileField(blank=True, default=None, null=True, upload_to='az-invoices/', verbose_name='la facture')),
                ('start', models.DateField(blank=True, default=None, verbose_name='Date début de la facture')),
                ('end', models.DateField(blank=True, default=None, verbose_name='Date fin de la facture')),
                ('state', models.CharField(blank=True, choices=[('INITIAL', 'Initial'), ('PENDING', 'En attente'), ('PAID', 'Payée'), ('CANCELED', 'Annulée')], default='INITIAL', max_length=45, verbose_name='État de la facture')),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
                ('contract', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='contractInvoice', to='app.contract', verbose_name='Contrat')),
            ],
            options={
                'verbose_name': 'Facture',
                'verbose_name_plural': 'Factures',
            },
        ),
    ]
