# Generated by Django 2.1 on 2019-03-22 11:24

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('engineer', '0001_initial'),
        ('customer', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Call',
            fields=[
                ('assign_date', models.DateTimeField(auto_now_add=True)),
                ('end_date', models.DateTimeField(default=datetime.datetime(2019, 3, 22, 19, 24, 3, 665243), help_text='the default value is 6 hours + assign_date')),
                ('notification_number', models.PositiveIntegerField(primary_key=True, serialize=False)),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='calls', to='customer.Customer')),
                ('engineer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='engineer.Engineer')),
            ],
            options={
                'get_latest_by': ['notification_number'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_type', models.CharField(choices=[('black-white machine', 'B&W Machine'), ('color machine', 'Colour Machine'), ('White Format machine', 'White-Format machine')], max_length=150, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Machine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('serial', models.IntegerField(blank=True, help_text='fill this if your serial is numbers only', unique=True, verbose_name='standard seial')),
                ('serial2', models.CharField(blank=True, help_text='fill this if your serial consists of numbers and letters', max_length=10, unique=True, verbose_name='non-standard serial')),
                ('machine_model', models.CharField(max_length=100)),
                ('slug', models.SlugField(unique=True)),
                ('description', models.TextField()),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('speed', models.IntegerField(blank=True, choices=[(20, 20), (30, 30), (35, 35), (45, 45), (55, 55), (65, 65), (75, 75), (90, 90)], null=True)),
                ('area', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='machines', to='engineer.Area')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='machine.Category')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.Customer')),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='machines_dep', to='customer.Department')),
                ('engineers', models.ManyToManyField(blank=True, related_name='machines', to='engineer.Engineer')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='call',
            name='machine',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calls', to='machine.Machine'),
        ),
    ]
