# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-15 18:00
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='Activite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('nom', models.CharField(max_length=200)),
                ('prenom', models.CharField(max_length=200)),
                ('societe', models.CharField(max_length=200)),
                ('adresse', models.CharField(max_length=200)),
                ('emailAdress', models.EmailField(max_length=254, verbose_name='adresse email du client')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Commercial',
            fields=[
                ('nom', models.CharField(max_length=200)),
                ('prenom', models.CharField(max_length=200)),
                ('date_embauche', models.DateField(verbose_name="date d'embauche")),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('liste_clients', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='cra.Client')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Consultant',
            fields=[
                ('nom', models.CharField(max_length=200)),
                ('prenom', models.CharField(max_length=200)),
                ('date_embauche', models.DateField(verbose_name="date d'embauche")),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Mission_en_cours',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dateDebutMission', models.DateTimeField(verbose_name='date de debut de mission')),
                ('poste', models.CharField(max_length=200)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cra.Client')),
                ('consultant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cra.Consultant')),
            ],
        ),
        migrations.CreateModel(
            name='Mission_terminee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dateDebutMission', models.DateTimeField(verbose_name='date de debut de mission')),
                ('poste', models.CharField(max_length=200)),
                ('dateFinMission', models.DateTimeField(verbose_name='date de fin de mission')),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cra.Client')),
                ('consultant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cra.Consultant')),
            ],
        ),
        migrations.AddField(
            model_name='commercial',
            name='liste_consultants',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='cra.Consultant'),
        ),
        migrations.AddField(
            model_name='activite',
            name='consultant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cra.Consultant'),
        ),
    ]
