# Generated by Django 2.2.6 on 2019-12-03 09:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Agent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=250)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('branch_name', models.CharField(max_length=50)),
                ('description', models.CharField(help_text='Comprehensive location details', max_length=500)),
                ('email', models.EmailField(max_length=254)),
                ('phone', phone_field.models.PhoneField(help_text='Contact phone number', max_length=31)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=250)),
                ('email', models.EmailField(max_length=254)),
                ('phonenumber', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Parcel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('serial_number', models.CharField(max_length=250)),
                ('status', models.CharField(choices=[('pending', 'Agent or Admin has received to be sent'), ('on-transit', 'Yet to confirmed by the receiving status'), ('arrived', 'Parcel has arrived to the receiving station')], default='pending', max_length=50)),
                ('description', models.CharField(help_text='Give more details of the parcel', max_length=250)),
                ('recepient_name', models.CharField(max_length=250)),
                ('recepient_number', models.CharField(max_length=250)),
                ('receiving_agent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='receiving_agent', to='parcelapp.Agent')),
                ('recepient_station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='recepient_station', to='parcelapp.Branch')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sender_name', to='parcelapp.Customer')),
                ('sending_station', models.ForeignKey(default='Main', on_delete=django.db.models.deletion.CASCADE, to='parcelapp.Agent')),
            ],
        ),
        migrations.AddField(
            model_name='agent',
            name='branch',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='agents', to='parcelapp.Branch'),
        ),
    ]
