# Generated by Django 3.1.7 on 2021-03-23 14:56

from django.conf import settings
import django.core.validators
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),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Nazwa')),
            ],
        ),
        migrations.CreateModel(
            name='Institution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Nazwa')),
                ('description', models.TextField(verbose_name='Opis')),
                ('type', models.IntegerField(choices=[(1, 'Fundacja'), (2, 'Organizacja pozarządowa'), (3, 'Zbiórka lokalna')], default=1, verbose_name='Typ')),
                ('categories', models.ManyToManyField(to='donation.Category', verbose_name='Kategorie')),
            ],
        ),
        migrations.CreateModel(
            name='Donation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(20)], verbose_name='Liczba worków')),
                ('address', models.CharField(max_length=32, verbose_name='Adres')),
                ('phone_number', models.CharField(max_length=16, verbose_name='Numer telefonu')),
                ('city', models.CharField(max_length=32, verbose_name='Miasto')),
                ('zip_code', models.CharField(max_length=6, verbose_name='Kod pocztowy')),
                ('pick_up_date', models.DateField(verbose_name='Data odbioru')),
                ('pick_up_time', models.TimeField(verbose_name='Godzina odbioru')),
                ('pick_up_comment', models.TextField(verbose_name='Komentarz')),
                ('categories', models.ManyToManyField(to='donation.Category', verbose_name='Kategorie')),
                ('institution', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='donation.institution', verbose_name='Instytucja')),
                ('user', models.ForeignKey(default=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Użytkownik')),
            ],
        ),
    ]
