# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-30 05:51
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('inventory', '0004_auto_20160926_2208'),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account_Angaza', models.CharField(max_length=8)),
                ('account_GLP', models.CharField(max_length=7)),
                ('plan_name', models.CharField(max_length=40)),
                ('plan_up', models.PositiveIntegerField(default=0)),
                ('plan_tot', models.PositiveIntegerField(default=0)),
                ('plan_week', models.PositiveIntegerField(default=0)),
                ('reg_date', models.DateTimeField(verbose_name='registration date')),
                ('status', models.CharField(choices=[('a', 'Activated'), ('d', 'Deactivated'), ('u', 'Unlocked'), ('w', 'Written Off')], default='a', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Agent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=30)),
                ('lastname', models.CharField(max_length=30)),
                ('start_date', models.DateTimeField(verbose_name='date hired')),
                ('gender', models.CharField(choices=[('MALE', 'Male'), ('FEMALE', 'Female')], max_length=1, null=True)),
                ('location', models.CharField(max_length=30)),
                ('phone', models.CharField(max_length=16)),
                ('label', models.CharField(max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1, null=True)),
                ('phone', models.CharField(max_length=16, null=True)),
                ('location', models.CharField(max_length=30, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Manager',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=30)),
                ('lastname', models.CharField(max_length=30)),
                ('start_date', models.DateTimeField(verbose_name='date hired')),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('district', models.CharField(max_length=30)),
                ('phone', models.CharField(max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.PositiveIntegerField(default=0)),
                ('date', models.DateTimeField(verbose_name='payment date')),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.Account')),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.Agent')),
            ],
        ),
        migrations.AddField(
            model_name='agent',
            name='manager',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.Manager'),
        ),
        migrations.AddField(
            model_name='account',
            name='agent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.Agent'),
        ),
        migrations.AddField(
            model_name='account',
            name='client',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.Client'),
        ),
        migrations.AddField(
            model_name='account',
            name='plan_product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Product'),
        ),
    ]
