<gh_stars>0
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2019-03-15 13:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
            ],
            options={
                'verbose_name_plural': 'Cities',
            },
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
            ],
            options={
                'verbose_name_plural': 'Countries',
            },
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.City')),
            ],
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to=b'', verbose_name='File')),
            ],
        ),
        migrations.CreateModel(
            name='Property',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('slug', models.SlugField(help_text='Short name', verbose_name='Slug')),
                ('description', models.TextField(verbose_name='Description')),
                ('property_type', models.IntegerField(choices=[(0, 'Apartment'), (1, 'House'), (2, 'Garage'), (3, 'Office'), (4, 'Land'), (5, 'Room'), (6, 'Building')], default=0, verbose_name='Type')),
                ('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.District')),
            ],
            options={
                'verbose_name_plural': 'Properties',
            },
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.Country')),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.Province')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Name')),
            ],
        ),
        migrations.AddField(
            model_name='property',
            name='tags',
            field=models.ManyToManyField(related_name='tags', related_query_name='tag', to='consumer.Tag'),
        ),
        migrations.AddField(
            model_name='photo',
            name='property',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='properties', related_query_name='property', to='consumer.Property'),
        ),
        migrations.AddField(
            model_name='city',
            name='area',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.Region'),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2019-03-15 13:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
            ],
            options={
                'verbose_name_plural': 'Cities',
            },
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
            ],
            options={
                'verbose_name_plural': 'Countries',
            },
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.City')),
            ],
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to=b'', verbose_name='File')),
            ],
        ),
        migrations.CreateModel(
            name='Property',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('slug', models.SlugField(help_text='Short name', verbose_name='Slug')),
                ('description', models.TextField(verbose_name='Description')),
                ('property_type', models.IntegerField(choices=[(0, 'Apartment'), (1, 'House'), (2, 'Garage'), (3, 'Office'), (4, 'Land'), (5, 'Room'), (6, 'Building')], default=0, verbose_name='Type')),
                ('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.District')),
            ],
            options={
                'verbose_name_plural': 'Properties',
            },
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.Country')),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.Province')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Name')),
            ],
        ),
        migrations.AddField(
            model_name='property',
            name='tags',
            field=models.ManyToManyField(related_name='tags', related_query_name='tag', to='consumer.Tag'),
        ),
        migrations.AddField(
            model_name='photo',
            name='property',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='properties', related_query_name='property', to='consumer.Property'),
        ),
        migrations.AddField(
            model_name='city',
            name='area',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consumer.Region'),
        ),
    ]
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2019-03-15 13:59