# Generated by Django 2.0.6 on 2018-06-06 19:56

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Casting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_number', models.CharField(max_length=255)),
                ('amount', models.IntegerField()),
                ('date_received', models.DateField()),
                ('date_of_expedition', models.DateField()),
                ('date_of_delivery', models.DateField()),
                ('completed_at', models.DateField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Part',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(max_length=255)),
                ('price_total', models.DecimalField(decimal_places=2, max_digits=10)),
                ('price_machining', models.DecimalField(decimal_places=2, max_digits=10)),
                ('casting', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='website.Casting')),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='part',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='website.Part'),
        ),
    ]
