# Generated by Django 2.1.5 on 2019-01-19 13:22

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('jobs', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('ends', models.DateField(default=django.utils.timezone.now)),
                ('status', models.IntegerField(choices=[(0, 'To do'), (1, 'In progress'), (2, 'Done')], default=0)),
                ('name', models.CharField(max_length=255)),
                ('rate', models.FloatField()),
                ('payment', models.FloatField(default=0)),
                ('qty', models.IntegerField(default=1)),
                ('price', models.FloatField()),
            ],
        ),
        migrations.RemoveField(
            model_name='company',
            name='price',
        ),
        migrations.RemoveField(
            model_name='material',
            name='price',
        ),
        migrations.AddField(
            model_name='job',
            name='client',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='jobs.Company'),
        ),
        migrations.AddField(
            model_name='job',
            name='material',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='jobs.Material'),
        ),
        migrations.AddField(
            model_name='job',
            name='worker',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
    ]
