# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-15 17:22
from __future__ import unicode_literals

import django.contrib.postgres.fields
import django.contrib.postgres.fields.hstore
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Nombre de la cuenta')),
            ],
        ),
        migrations.CreateModel(
            name='Availability',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hotel', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('data', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
            ],
        ),
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=200)),
                ('data', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Data',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('meta_data', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Navigation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('session_id', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('last_view', models.DateTimeField(auto_now=True)),
                ('user_info', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('availabilities', models.ManyToManyField(blank=True, null=True, to='data.Availability')),
                ('bookings', models.ManyToManyField(blank=True, null=True, to='data.Booking')),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('unique_id', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('data', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('actions', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict), default=list, size=None)),
                ('meta_data', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('enviroment', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('unique_id', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('name', models.CharField(max_length=200, verbose_name='Nombre del proyecto')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='ProjectTypes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Ejem: Vacacional, Urbano, Individual, Corporativa, etc...', max_length=100, verbose_name='Project type name')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', django.contrib.postgres.fields.hstore.HStoreField(blank=True, default=dict)),
                ('unique_id', models.CharField(max_length=200)),
            ],
        ),
        migrations.AddField(
            model_name='project',
            name='tags',
            field=models.ManyToManyField(to='data.ProjectTypes'),
        ),
        migrations.AddField(
            model_name='navigation',
            name='pages',
            field=models.ManyToManyField(blank=True, to='data.Page'),
        ),
        migrations.AddField(
            model_name='navigation',
            name='project',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='data.Project'),
        ),
        migrations.AddField(
            model_name='navigation',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='data.UserProfile'),
        ),
        migrations.AddField(
            model_name='data',
            name='project',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='data.Project'),
        ),
        migrations.AddField(
            model_name='data',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='user', to='data.UserProfile'),
        ),
        migrations.AddField(
            model_name='account',
            name='projects',
            field=models.ManyToManyField(to='data.Project'),
        ),
    ]
