# Generated by Django 3.1 on 2020-09-03 17:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Amenity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=1024)),
            ],
            options={
                'db_table': 'amenities',
            },
        ),
        migrations.CreateModel(
            name='BedRoom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256, null=True)),
            ],
            options={
                'db_table': 'bedrooms',
            },
        ),
        migrations.CreateModel(
            name='BedType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, null=True)),
            ],
            options={
                'db_table': 'bedtypes',
            },
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('address', models.CharField(max_length=256)),
                ('max_personnal', models.CharField(max_length=48)),
                ('bed_room', models.CharField(max_length=48)),
                ('bed', models.CharField(max_length=48)),
                ('bath_room', models.CharField(max_length=48)),
                ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('latitude', models.DecimalField(decimal_places=8, max_digits=13)),
                ('longitude', models.DecimalField(decimal_places=8, max_digits=13)),
                ('description', models.CharField(max_length=4096)),
            ],
            options={
                'db_table': 'rooms',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=96, null=True)),
                ('detail', models.CharField(max_length=1024, null=True)),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room')),
            ],
            options={
                'db_table': 'tags',
            },
        ),
        migrations.CreateModel(
            name='RoomAmenity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amenity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.amenity')),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room')),
            ],
            options={
                'db_table': 'room_amenities',
            },
        ),
        migrations.AddField(
            model_name='room',
            name='amenity',
            field=models.ManyToManyField(through='room.RoomAmenity', to='room.Amenity'),
        ),
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rules_of_use', models.CharField(max_length=512)),
                ('health_and_safety', models.CharField(max_length=512)),
                ('refund_policy', models.CharField(max_length=512)),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room')),
            ],
            options={
                'db_table': 'notes',
            },
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image_url', models.URLField()),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room')),
            ],
            options={
                'db_table': 'images',
            },
        ),
        migrations.CreateModel(
            name='BuildingType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sub_title', models.CharField(max_length=256)),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room')),
            ],
            options={
                'db_table': 'buildingtypes',
            },
        ),
        migrations.CreateModel(
            name='BedTypeRoom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bedroom', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.bedroom')),
                ('bedtype', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.bedtype')),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room')),
            ],
            options={
                'db_table': 'bed_type_rooms',
            },
        ),
        migrations.AddField(
            model_name='bedtype',
            name='bedroom',
            field=models.ManyToManyField(through='room.BedTypeRoom', to='room.BedRoom'),
        ),
    ]
