# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-17 21:27
from __future__ import unicode_literals

import datetime

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


class Migration(migrations.Migration):
    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Adres',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(blank=True, max_length=200)),
                ('ulica', models.CharField(max_length=200)),
                ('nr', models.CharField(max_length=20)),
                ('miasto', models.CharField(max_length=200)),
                ('kod_pocztowy', models.CharField(max_length=10)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                           to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Zlecenie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status_zlecenia', models.IntegerField(
                    choices=[(1, 'Nowe'), (2, 'Przyjete'), (3, 'W oczekiwaniu na odbior'), (4, 'Dostawa'),
                             (5, 'Zrealizowane')], default=1)),
                ('data_zlozenia',
                 models.DateTimeField(default=datetime.datetime(2017, 12, 17, 21, 27, 42, 354560, tzinfo=utc))),
                ('data_odbioru', models.DateTimeField()),
                ('data_dostarczenia', models.DateTimeField()),
                ('wartosc', models.FloatField(default=0.0)),
                ('faktura', models.IntegerField(default=0)),
                ('adres_dostawy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dostawa',
                                                    to='Adres_app.Adres')),
                ('adres_odbioru', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='odbior',
                                                    to='Adres_app.Adres')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
