# Generated by Django 3.0.1 on 2020-01-09 13:14

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import pytz


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('units', '__first__'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.TextField(default='init')),
                ('commentary', models.TextField(default='')),
                ('start_date', models.DateTimeField(default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=pytz.UTC))),
                ('stop_date', models.DateTimeField(default=datetime.datetime(1970, 1, 2, 0, 0, tzinfo=pytz.UTC))),
                ('bail', models.FloatField(default=0)),
                ('cost', models.FloatField(default=0)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='order_client', to=settings.AUTH_USER_MODEL)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='order_owner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderUnit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders.Order')),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='units.Unit')),
            ],
        ),
    ]
