# Generated by Django 2.2.16 on 2021-10-09 02:08

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Entreprise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code_couleur', models.CharField(blank=True, max_length=30)),
                ('logo', models.FileField(blank=True, upload_to='logo_entreprise/')),
                ('nom_commercial', models.CharField(default='', max_length=200)),
                ('forme_juridique', models.CharField(blank=True, choices=[('Auto-entrepreneur', 'Auto-entrepreneur'), ('EIRL', 'EIRL'), ('EI', 'EI'), ('SASU', 'SASU'), ('SAS', 'SAS'), ('SARL', 'SARL'), ('EURL', 'EURL'), ('SA', 'SA'), ('SNC', 'SNC'), ('CAE', 'CAE'), ('Association', 'Association'), ('SCI', 'SCI'), ('Syndicat patronal', 'Syndicat patronal')], max_length=200, null=True)),
                ('raison_social', models.CharField(default='', max_length=200)),
                ('capital_social', models.CharField(default='', max_length=200)),
                ('numero_SIREN', models.CharField(default='', max_length=100)),
                ('adresse', models.CharField(default='', max_length=200)),
                ('code_postal', models.CharField(default='', max_length=6)),
                ('ville', models.CharField(default='', max_length=200)),
                ('numero_de_telephone', models.CharField(default='', max_length=100)),
                ('adresse_email', models.CharField(default='', max_length=200)),
                ('nom_dirigeant', models.CharField(default='', max_length=200)),
                ('prenom_dirigeant', models.CharField(default='', max_length=200)),
                ('role_dirigeant', models.CharField(default='', max_length=200)),
                ('numero_de_telephone_dirigeant', models.CharField(default='', max_length=100)),
                ('adresse_email_dirigeant', models.CharField(default='', max_length=200)),
                ('collaborateur', models.ManyToManyField(blank=True, related_name='collaborateur', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Entreprise',
                'verbose_name_plural': 'Entreprise',
                'ordering': ['nom_commercial'],
            },
        ),
        migrations.CreateModel(
            name='Projet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom', models.CharField(default='', max_length=200)),
                ('descriptif', models.TextField(blank=True, default='', null=True)),
                ('date_modification', models.DateTimeField(auto_now=True)),
                ('date_creation', models.DateTimeField(auto_now_add=True)),
                ('entreprise', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Entreprise')),
            ],
            options={
                'verbose_name': 'Projet',
                'verbose_name_plural': 'Projets',
                'ordering': ['nom'],
            },
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_de_service', models.CharField(choices=[('Développement', 'Développement'), ('Hebergement', 'Hebergement'), ('Maintenance', 'Maintenance'), ('Conseil', 'Conseil'), ('SEO & SEA', 'SEO & SEA')], max_length=200)),
                ('nom', models.CharField(default='', max_length=200)),
                ('descriptif', models.TextField(blank=True, default='', null=True)),
                ('type_de_paiement', models.CharField(choices=[('Comptant', 'Comptant'), ('Mensuel', 'Mensuel'), ('Annuel', 'Annuel')], max_length=200)),
                ('prix_HT', models.FloatField(default='0.0')),
                ('statut', models.CharField(choices=[('En cours', 'En cours'), ('Terminé', 'Terminé')], max_length=200)),
                ('date_debut', models.DateField(null=True)),
                ('date_fin', models.DateField(null=True)),
                ('date_modification', models.DateTimeField(auto_now=True)),
                ('date_creation', models.DateTimeField(auto_now_add=True)),
                ('projet', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Projet')),
            ],
            options={
                'verbose_name': 'Service',
                'verbose_name_plural': 'Services',
                'ordering': ['nom'],
            },
        ),
        migrations.CreateModel(
            name='Facture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numero', models.CharField(default='', max_length=200)),
                ('prix_HT', models.FloatField(default='0.0')),
                ('fichier', models.FileField(blank=True, upload_to='factures/')),
                ('statut', models.CharField(choices=[('Payé', 'Payé'), ('En attente de paiement', 'En attente de paiement'), ('A venir', 'A venir')], max_length=200)),
                ('date_modification', models.DateTimeField(auto_now=True)),
                ('date_creation', models.DateTimeField(auto_now_add=True)),
                ('projet', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Projet')),
                ('service', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Service')),
            ],
            options={
                'verbose_name': 'Facture',
                'verbose_name_plural': 'Factures',
                'ordering': ['numero'],
            },
        ),
    ]
