# Generated by Django 2.2.2 on 2019-07-25 07:18

from django.conf import settings
import django.contrib.gis.db.models.fields
import django.contrib.postgres.fields
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='Property',
            fields=[
                ('property_id', models.AutoField(primary_key=True, serialize=False)),
                ('address', models.CharField(blank=True, default='', max_length=300)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('num_guests', models.IntegerField(default=1)),
                ('num_bathrooms', models.IntegerField(default=1)),
                ('num_beds', models.IntegerField(default=1)),
                ('num_rooms', models.IntegerField(default=1)),
                ('description', models.CharField(blank=True, default='', max_length=2000)),
                ('space', models.CharField(blank=True, default='', max_length=2000)),
                ('name', models.CharField(max_length=300)),
                ('features', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=250), default=[], size=None)),
                ('owner_id', models.IntegerField(null=True)),
                ('price', models.FloatField(default=100.0)),
                ('avg_rating', models.FloatField(default=0.0)),
                ('images', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=150), default=['h', 't', 't', 'p', ':', '/', '/', 'w', 't', 'l', 'r', 'e', 'a', 'l', 't', 'y', '.', 'm', 'y', '/', 'a', 'd', 'm', 'i', 'n', '/', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'y', '/', 'd', 'e', 'f', 'a', 'u', 'l', 't', '.', 'j', 'p', 'g'], size=None)),
                ('location', django.contrib.gis.db.models.fields.PointField(default=None, null=True, srid=4326)),
                ('building_type', models.CharField(blank=True, default='', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('rating_id', models.AutoField(primary_key=True, serialize=False)),
                ('value', models.FloatField(default=5.0)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('is_anonymous', models.BooleanField(default=False)),
                ('notes', models.CharField(blank=True, default='', max_length=2000)),
                ('from_dataset', models.BooleanField(default=False)),
                ('property_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='advertising.Property')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
