# Generated by Django 4.0.10 on 2025-05-19 08:58

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


class Migration(migrations.Migration):

    dependencies = [
        ('userapp', '0003_alter_costumuser_user'),
        ('app', '0009_alter_contactofcontract_address_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, default='', max_length=255, verbose_name="Nom de l'employé")),
                ('sex', models.CharField(blank=True, choices=[('M', 'Homme'), ('F', 'Femme')], default='M', max_length=45, verbose_name='Sexe')),
                ('birthdate', models.DateField(blank=True, verbose_name='Date de naissance')),
                ('phone', models.CharField(blank=True, default='', max_length=45, verbose_name='Numéro de téléphone')),
                ('address', models.CharField(blank=True, default='', max_length=255, verbose_name='Adresse')),
                ('identityNumber', models.CharField(blank=True, default='', max_length=255, verbose_name="Numéro d'identité")),
                ('identityType', models.CharField(blank=True, choices=[('CIN', 'CIN'), ('PASSPORT', 'PASSPORT'), ('PERMIS', 'PERMIS'), ('RCCM', 'RCCM'), ('NINEA', 'NINEA'), ('OTHER', 'OTHER')], default='CIN', max_length=45, verbose_name="Type d'identité")),
                ('is_active', models.BooleanField(default=True)),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
                ('cuser', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='employeeUser', to='userapp.costumuser', verbose_name='Utilisateur')),
                ('nationality', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='employeeNationality', to='app.nationality', verbose_name='Nationalité')),
                ('profession', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='employeeProfession', to='app.profession', verbose_name='Profession')),
            ],
            options={
                'verbose_name': 'Employé',
                'verbose_name_plural': 'Employés',
            },
        ),
        migrations.CreateModel(
            name='EmployeeContract',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': "Contrat d'employé",
                'verbose_name_plural': "Contrats d'employés",
            },
        ),
        migrations.CreateModel(
            name='InsuranceCompany',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, default='', max_length=255, verbose_name='Nom de la compagnie')),
                ('email', models.CharField(blank=True, default='', max_length=255, verbose_name='Email')),
                ('phone', models.CharField(blank=True, default='', max_length=45, verbose_name='Numéro de téléphone')),
                ('address', models.CharField(blank=True, default='', max_length=255, verbose_name='Adresse')),
                ('logo', models.ImageField(blank=True, default='', upload_to='az-images/', verbose_name='Logo')),
                ('description', models.TextField(blank=True, default='', verbose_name='Description')),
                ('website', models.CharField(blank=True, default='', max_length=255, verbose_name='Site web')),
                ('slug', models.TextField(blank=True, default=uuid.UUID('8969e58c-dae0-4fdc-8f7e-38d57b23c7c9'), max_length=200, unique=True)),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': "Compagnie d'assurance",
                'verbose_name_plural': "Compagnies d'assurance",
            },
        ),
        migrations.AlterModelOptions(
            name='customer',
            options={'ordering': ['-createdAt'], 'verbose_name': 'Entreprise client', 'verbose_name_plural': 'Entreprises clients'},
        ),
        migrations.RemoveField(
            model_name='beneficiary',
            name='contract',
        ),
        migrations.RemoveField(
            model_name='beneficiary',
            name='distribution',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='annualPension',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='dueDate',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='foresightBonus',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='initPayment',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='membershipFees',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='period',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='periodicBonus',
        ),
        migrations.RemoveField(
            model_name='contract',
            name='slug',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='bank',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='birthdate',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='birthplace',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='codeBank',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='dateOfIssue',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='identityNumber',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='identityType',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='nationality',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='numberBank',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='profession',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='rib',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='sector',
        ),
        migrations.RemoveField(
            model_name='customer',
            name='sex',
        ),
        migrations.AddField(
            model_name='beneficiary',
            name='percentage',
            field=models.IntegerField(blank=True, default=0, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)], verbose_name='Pourcentage'),
        ),
        migrations.AddField(
            model_name='contract',
            name='expireAt',
            field=models.DateField(blank=True, null=True, verbose_name="Date d'expiration"),
        ),
        migrations.AddField(
            model_name='customer',
            name='address',
            field=models.CharField(blank=True, default='', max_length=255, verbose_name='Adresse'),
        ),
        migrations.AddField(
            model_name='customer',
            name='email',
            field=models.CharField(blank=True, default='', max_length=255, verbose_name='Email'),
        ),
        migrations.AddField(
            model_name='customer',
            name='name',
            field=models.CharField(blank=True, default='', max_length=255, verbose_name="Nom de l'entreprise"),
        ),
        migrations.AddField(
            model_name='customer',
            name='ninea',
            field=models.CharField(blank=True, default='', max_length=255, verbose_name='NINEA'),
        ),
        migrations.AddField(
            model_name='customer',
            name='phone',
            field=models.CharField(blank=True, default='', max_length=45, verbose_name='Numéro de téléphone'),
        ),
        migrations.AddField(
            model_name='customer',
            name='rccm',
            field=models.CharField(blank=True, default='', max_length=255, verbose_name='RCCM'),
        ),
        migrations.AlterField(
            model_name='contract',
            name='partner',
            field=models.CharField(blank=True, default='', max_length=255, null=True, verbose_name='Partenaire'),
        ),
        migrations.AlterField(
            model_name='contract',
            name='uuid',
            field=models.CharField(blank=True, default=uuid.UUID('70745a1b-0b55-4348-869a-bddbbd4035bd'), max_length=200, null=True, unique=True),
        ),
        migrations.AlterField(
            model_name='customer',
            name='cuser',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='customerUser', to='userapp.costumuser', verbose_name='Utilisateur'),
        ),
        migrations.DeleteModel(
            name='Partner',
        ),
        migrations.AddField(
            model_name='employeecontract',
            name='contract',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='contractEmployee', to='app.contract', verbose_name='Contrat'),
        ),
        migrations.AddField(
            model_name='employeecontract',
            name='employee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='employeeContract', to='app.employee', verbose_name='Employé'),
        ),
        migrations.AddField(
            model_name='beneficiary',
            name='employee',
            field=models.OneToOneField(default=None, on_delete=django.db.models.deletion.DO_NOTHING, related_name='benefEmployee', to='app.employee', verbose_name='Employé'),
        ),
    ]
