<reponame>madalingurgu/apms
# Generated by Django 2.0.1 on 2018-01-18 20:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('customer_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('country', models.CharField(blank=True, max_length=50, null=True)),
                ('adress', models.CharField(blank=True, max_length=255, null=True)),
                ('contact_name', models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Engineering',
            fields=[
                ('eng_id', models.AutoField(primary_key=True, serialize=False)),
                ('reference', models.CharField(blank=True, max_length=50, null=True)),
                ('instructions', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False)),
                ('quantity', models.IntegerField(blank=True, null=True)),
                ('value', models.FloatField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('product_id', models.AutoField(primary_key=True, serialize=False)),
                ('p_type', models.CharField(choices=[('BBT', 'BBT'), ('BTY', 'BTY'), ('BLS', 'BLS'), ('BRS', 'BRS'), ('CKS', 'CKS'), ('FMI', 'FMI'), ('GRD', 'GRD'), ('LID', 'LID'), ('MFT', 'MFT'), ('SHR', 'SHR'), ('SPN', 'SPN'), ('TRL', 'TRL')], default='BBT', max_length=20)),
                ('drawing_no', models.IntegerField()),
                ('description', models.CharField(max_length=255)),
                ('technology', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('project_no', models.IntegerField(primary_key=True, serialize=False)),
                ('r_type', models.CharField(choices=[('ORDER', 'Order'), ('SAMPLE', 'Sample'), ('ECR', 'Ecr'), ('ERF', 'Erf')], default='ORDER', max_length=20)),
                ('post_date', models.DateTimeField(verbose_name='date posted')),
                ('request_date', models.DateField(blank=True, null=True, verbose_name='request date')),
                ('estimate', models.DateField(blank=True, null=True, verbose_name='estimate completion date')),
                ('status', models.CharField(choices=[('QUEUE', 'Queue'), ('WIP', 'Wip'), ('COMPLETE', 'Complete'), ('HOLD', 'Hold')], default='QUEUE', max_length=20)),
                ('comments', models.CharField(blank=True, max_length=255, null=True)),
                ('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Customer')),
                ('eng', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Engineering')),
                ('order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Order')),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Product')),
            ],
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('staff_id', models.AutoField(primary_key=True, serialize=False)),
                ('role', models.CharField(max_length=50)),
                ('name', models.CharField(max_length=100)),
                ('email', models.CharField(blank=True, max_length=50, null=True)),
                ('phone', models.IntegerField(blank=True, null=True)),
                ('location', models.CharField(blank=True, max_length=50, null=True)),
                ('user', models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='request',
            name='responsable',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Staff'),
        ),
        migrations.AddField(
            model_name='product',
            name='engineer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Staff'),
        ),
        migrations.AddField(
            model_name='customer',
            name='sales_responsable',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Staff'),
        ),
    ]

# Generated by Django 2.0.1 on 2018-01-18 20:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('customer_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('country', models.CharField(blank=True, max_length=50, null=True)),
                ('adress', models.CharField(blank=True, max_length=255, null=True)),
                ('contact_name', models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Engineering',
            fields=[
                ('eng_id', models.AutoField(primary_key=True, serialize=False)),
                ('reference', models.CharField(blank=True, max_length=50, null=True)),
                ('instructions', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False)),
                ('quantity', models.IntegerField(blank=True, null=True)),
                ('value', models.FloatField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('product_id', models.AutoField(primary_key=True, serialize=False)),
                ('p_type', models.CharField(choices=[('BBT', 'BBT'), ('BTY', 'BTY'), ('BLS', 'BLS'), ('BRS', 'BRS'), ('CKS', 'CKS'), ('FMI', 'FMI'), ('GRD', 'GRD'), ('LID', 'LID'), ('MFT', 'MFT'), ('SHR', 'SHR'), ('SPN', 'SPN'), ('TRL', 'TRL')], default='BBT', max_length=20)),
                ('drawing_no', models.IntegerField()),
                ('description', models.CharField(max_length=255)),
                ('technology', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('project_no', models.IntegerField(primary_key=True, serialize=False)),
                ('r_type', models.CharField(choices=[('ORDER', 'Order'), ('SAMPLE', 'Sample'), ('ECR', 'Ecr'), ('ERF', 'Erf')], default='ORDER', max_length=20)),
                ('post_date', models.DateTimeField(verbose_name='date posted')),
                ('request_date', models.DateField(blank=True, null=True, verbose_name='request date')),
                ('estimate', models.DateField(blank=True, null=True, verbose_name='estimate completion date')),
                ('status', models.CharField(choices=[('QUEUE', 'Queue'), ('WIP', 'Wip'), ('COMPLETE', 'Complete'), ('HOLD', 'Hold')], default='QUEUE', max_length=20)),
                ('comments', models.CharField(blank=True, max_length=255, null=True)),
                ('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Customer')),
                ('eng', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Engineering')),
                ('order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Order')),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Product')),
            ],
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('staff_id', models.AutoField(primary_key=True, serialize=False)),
                ('role', models.CharField(max_length=50)),
                ('name', models.CharField(max_length=100)),
                ('email', models.CharField(blank=True, max_length=50, null=True)),
                ('phone', models.IntegerField(blank=True, null=True)),
                ('location', models.CharField(blank=True, max_length=50, null=True)),
                ('user', models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='request',
            name='responsable',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Staff'),
        ),
        migrations.AddField(
            model_name='product',
            name='engineer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Staff'),
        ),
        migrations.AddField(
            model_name='customer',
            name='sales_responsable',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Staff'),
        ),
    ]
# Generated by Django 2.0.1 on 2018-01-18 20:01