# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-30 21:03
from __future__ import unicode_literals

import datetime
from django.conf import settings
import django.contrib.gis.db.models.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),
        ('sites', '0002_alter_domain_unique'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
                ('slug', models.SlugField(verbose_name='Slug')),
            ],
        ),
        migrations.CreateModel(
            name='Place',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
                ('slug', models.SlugField(verbose_name='Slug')),
                ('longitude', models.FloatField(blank=True, editable=False, verbose_name='Longitude')),
                ('latitude', models.FloatField(blank=True, editable=False, verbose_name='Latitude')),
                ('position', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326, verbose_name='Position')),
                ('is_public', models.BooleanField(db_index=True, default=False, verbose_name='Is public?')),
                ('street', models.CharField(blank=True, max_length=250, verbose_name='Street')),
                ('postal_code', models.CharField(blank=True, max_length=25, verbose_name='Postal code')),
                ('city', models.CharField(blank=True, max_length=100, verbose_name='City')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('added_on', models.DateTimeField(default=datetime.datetime.now, editable=False)),
                ('updated_on', models.DateTimeField(editable=False)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='places.Category')),
                ('site', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Place',
                'verbose_name_plural': 'Places',
            },
        ),
        migrations.AlterUniqueTogether(
            name='place',
            unique_together=set([('site', 'slug')]),
        ),
    ]
