<gh_stars>0
# Generated by Django 3.1.7 on 2021-04-10 08:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('products', '0006_auto_20210409_1259'),
        ('account', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(max_length=64, verbose_name='Numer zamówienia')),
                ('status', models.IntegerField(choices=[(1, 'Otwarte'), (2, 'W przygotowaniu'), (3, 'W dostawie'), (4, 'Zrealizowane'), (5, 'Anulowane')], default=1, verbose_name='Status zamówienia')),
                ('date', models.DateTimeField(db_index=True)),
                ('type_of_order', models.IntegerField(choices=[(1, 'Odbiór osobisty'), (2, 'Dostawa')], verbose_name='Rodzaj zamówienia')),
                ('phone_number', models.CharField(blank=True, max_length=12, null=True, verbose_name='Numer telefonu')),
                ('start_delivery_time', models.TimeField(blank=True, null=True, verbose_name='Czas wywozu')),
                ('sms_send', models.BooleanField(default=False, verbose_name='Sms')),
                ('sms_time', models.TimeField(blank=True, null=True, verbose_name='Czas smsa')),
                ('promo', models.BooleanField(default=False, verbose_name='Promocja')),
                ('discount', models.IntegerField(default=0, verbose_name='Rabat')),
                ('info', models.CharField(blank=True, max_length=256, null=True, verbose_name='Informacje')),
                ('is_paid', models.BooleanField(default=False, verbose_name='Czy zapłacono?')),
                ('printed', models.BooleanField(default=True, verbose_name='Wydrukowano paragon?')),
                ('total_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=7, verbose_name='Cena zamówienia')),
                ('address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.address', verbose_name='Adres dostawy')),
                ('client', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='clinet_id', to=settings.AUTH_USER_MODEL, verbose_name='Klient')),
            ],
            options={
                'verbose_name_plural': 'Zamówienia',
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='PayMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(verbose_name='Numer wyświetlania')),
                ('name', models.CharField(max_length=64, verbose_name='Nazwa metody płatności')),
                ('pay_method', models.IntegerField(choices=[(1, 'gotówka'), (2, 'karta'), (3, 'przelew')], verbose_name='Rodzaj płatności')),
                ('is_active', models.BooleanField(default=True, verbose_name='Czy aktualna')),
            ],
            options={
                'verbose_name_plural': 'Rodzaje płatności',
                'ordering': ('number',),
            },
        ),
        migrations.CreateModel(
            name='ProductCopy',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('color_text', models.IntegerField(choices=[(0, 'Czarne'), (1, 'Czerwone'), (2, 'Niebieskie'), (3, 'Zielone'), (4, 'Fioletowe')], verbose_name='Kolor guzików')),
                ('qty', models.IntegerField(default=1, verbose_name='Ilość pozycji')),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=7, verbose_name='Cena podstawowa')),
                ('order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='orders.orders', verbose_name='Relacja do produktu')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.products', verbose_name='Relacja do produktu')),
            ],
            options={
                'verbose_name_plural': 'Pozycje rachunku',
                'ordering': ('id',),
            },
        ),
        migrations.AddField(
            model_name='orders',
            name='pay_method',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='orders.paymethod', verbose_name='Rodzaj płatności'),
        ),
        migrations.AddField(
            model_name='orders',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.store', verbose_name='Magazyn'),
        ),
        migrations.AddField(
            model_name='orders',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profile_id', to=settings.AUTH_USER_MODEL, verbose_name='Osoba rejestrująca zamówienie'),
        ),
    ]

# Generated by Django 3.1.7 on 2021-04-10 08:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('products', '0006_auto_20210409_1259'),
        ('account', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(max_length=64, verbose_name='Numer zamówienia')),
                ('status', models.IntegerField(choices=[(1, 'Otwarte'), (2, 'W przygotowaniu'), (3, 'W dostawie'), (4, 'Zrealizowane'), (5, 'Anulowane')], default=1, verbose_name='Status zamówienia')),
                ('date', models.DateTimeField(db_index=True)),
                ('type_of_order', models.IntegerField(choices=[(1, 'Odbiór osobisty'), (2, 'Dostawa')], verbose_name='Rodzaj zamówienia')),
                ('phone_number', models.CharField(blank=True, max_length=12, null=True, verbose_name='Numer telefonu')),
                ('start_delivery_time', models.TimeField(blank=True, null=True, verbose_name='Czas wywozu')),
                ('sms_send', models.BooleanField(default=False, verbose_name='Sms')),
                ('sms_time', models.TimeField(blank=True, null=True, verbose_name='Czas smsa')),
                ('promo', models.BooleanField(default=False, verbose_name='Promocja')),
                ('discount', models.IntegerField(default=0, verbose_name='Rabat')),
                ('info', models.CharField(blank=True, max_length=256, null=True, verbose_name='Informacje')),
                ('is_paid', models.BooleanField(default=False, verbose_name='Czy zapłacono?')),
                ('printed', models.BooleanField(default=True, verbose_name='Wydrukowano paragon?')),
                ('total_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=7, verbose_name='Cena zamówienia')),
                ('address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.address', verbose_name='Adres dostawy')),
                ('client', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='clinet_id', to=settings.AUTH_USER_MODEL, verbose_name='Klient')),
            ],
            options={
                'verbose_name_plural': 'Zamówienia',
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='PayMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(verbose_name='Numer wyświetlania')),
                ('name', models.CharField(max_length=64, verbose_name='Nazwa metody płatności')),
                ('pay_method', models.IntegerField(choices=[(1, 'gotówka'), (2, 'karta'), (3, 'przelew')], verbose_name='Rodzaj płatności')),
                ('is_active', models.BooleanField(default=True, verbose_name='Czy aktualna')),
            ],
            options={
                'verbose_name_plural': 'Rodzaje płatności',
                'ordering': ('number',),
            },
        ),
        migrations.CreateModel(
            name='ProductCopy',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('color_text', models.IntegerField(choices=[(0, 'Czarne'), (1, 'Czerwone'), (2, 'Niebieskie'), (3, 'Zielone'), (4, 'Fioletowe')], verbose_name='Kolor guzików')),
                ('qty', models.IntegerField(default=1, verbose_name='Ilość pozycji')),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=7, verbose_name='Cena podstawowa')),
                ('order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='orders.orders', verbose_name='Relacja do produktu')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.products', verbose_name='Relacja do produktu')),
            ],
            options={
                'verbose_name_plural': 'Pozycje rachunku',
                'ordering': ('id',),
            },
        ),
        migrations.AddField(
            model_name='orders',
            name='pay_method',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='orders.paymethod', verbose_name='Rodzaj płatności'),
        ),
        migrations.AddField(
            model_name='orders',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.store', verbose_name='Magazyn'),
        ),
        migrations.AddField(
            model_name='orders',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profile_id', to=settings.AUTH_USER_MODEL, verbose_name='Osoba rejestrująca zamówienie'),
        ),
    ]
# Generated by Django 3.1.7 on 2021-04-10 08:15