# Generated by Django 3.1 on 2020-08-25 23:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('hosts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Place',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=100)),
                ('address', models.CharField(max_length=500)),
                ('description', models.TextField()),
                ('policy', models.TextField()),
                ('check_in', models.TimeField(auto_now_add=True)),
                ('check_out', models.TimeField(auto_now_add=True)),
                ('instant_book', models.BooleanField(default=False)),
                ('price', models.IntegerField(default=0)),
                ('max_guests', models.IntegerField(default=1)),
                ('location_code', models.CharField(max_length=10)),
                ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='places', to='hosts.host')),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='PlacePhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now_add=True)),
                ('file', models.ImageField(upload_to='')),
                ('caption', models.CharField(max_length=100)),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='places.place')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
