# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-01 11:35
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 = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Agence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numeroCodique', models.CharField(max_length=15, unique=True)),
                ('libeleAgence', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Employe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('matricule', models.CharField(max_length=30)),
                ('agence', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='teyco.Agence')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Entite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codeEntite', models.CharField(max_length=15, unique=True)),
                ('libeleEntite', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='EtatMandat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codeEtat', models.CharField(max_length=15)),
                ('LibelleEtat', models.CharField(blank=True, max_length=25)),
            ],
        ),
        migrations.CreateModel(
            name='Mandat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('matricule', models.CharField(max_length=20)),
                ('prenom', models.CharField(max_length=30)),
                ('nom', models.CharField(max_length=30)),
                ('categorie', models.CharField(max_length=30)),
                ('montant', models.CharField(max_length=30)),
                ('secteur', models.CharField(max_length=30)),
                ('date_creation', models.DateField(auto_now_add=True)),
                ('date_modification', models.DateField(auto_now=True)),
                ('periode', models.CharField(blank=True, max_length=50)),
                ('etatMandat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='teyco.EtatMandat')),
            ],
        ),
        migrations.CreateModel(
            name='Paiement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('matricule', models.CharField(max_length=20)),
                ('prenom', models.CharField(max_length=30)),
                ('nom', models.CharField(max_length=30)),
                ('categorie', models.CharField(blank=True, max_length=30)),
                ('montant', models.CharField(max_length=30)),
                ('secteur', models.CharField(blank=True, max_length=30)),
                ('date_paiement', models.DateField(auto_now_add=True)),
                ('codeEtat_mandat', models.CharField(max_length=15, null=True)),
                ('agence_payeur', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='teyco.Agence')),
                ('agent_payeur', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='teyco.Employe')),
                ('mandat_paye', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='teyco.Mandat')),
            ],
        ),
        migrations.AddField(
            model_name='agence',
            name='entite',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='teyco.Entite'),
        ),
    ]
