# Generated by Django 3.2 on 2021-05-03 08:14

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),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('town', models.CharField(max_length=40, verbose_name='Town')),
                ('street', models.CharField(max_length=40, verbose_name='Street')),
                ('number', models.IntegerField(verbose_name='House number')),
                ('PSC', models.IntegerField(verbose_name='PSC')),
                ('country', models.CharField(max_length=40, verbose_name='Country')),
            ],
        ),
        migrations.CreateModel(
            name='Cottage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Enter a cottage name', max_length=100, verbose_name='Cottage name')),
                ('description', models.TextField(blank=True, help_text='Write some info about your cottage (not required)', null=True, verbose_name='About cottage')),
                ('spaces', models.IntegerField(help_text='Enter a number of spaces the cottage has', verbose_name='Spaces')),
                ('address', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='cottages.address')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Reservation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_date', models.DateField(verbose_name='Start date')),
                ('end_date', models.DateField(verbose_name='End date')),
                ('is_private', models.BooleanField(default=True)),
                ('cottage', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cottages.cottage')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
