# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-05 08:56
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import geoposition.fields
import model_utils.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('cities_light', '0006_compensate_for_0003_bytestring_bug'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Properties',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('title', models.CharField(max_length=255)),
                ('status', models.BooleanField(default=True)),
                ('prop_type', models.CharField(choices=[('Appartment', 'Appartment'), ('Building', 'Building'), ('Land', 'Land'), ('Villa', 'Villa'), ('Store', 'Store'), ('Office', 'Office')], max_length=20)),
                ('category', models.CharField(choices=[('s', 'For Sale'), ('r', 'For Rent')], max_length=1)),
                ('description', models.TextField()),
                ('price', models.IntegerField()),
                ('size', models.IntegerField()),
                ('yt_url', models.URLField(blank=True, null=True)),
                ('position', geoposition.fields.GeopositionField(max_length=42)),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cities_light.Region')),
                ('neighborhood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cities_light.City')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PropertiesPhotos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prop_photo', models.ImageField(blank=True, height_field='img_height', null=True, upload_to=b'', width_field='img_width')),
                ('img_height', models.IntegerField(default=0)),
                ('img_width', models.IntegerField(default=0)),
                ('prop', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='properties.Properties')),
            ],
        ),
    ]
