# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-10-25 15:43


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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('segments', '0001_initial'),
        ('basemodels', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('reviews', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='BaseReviewSegment',
            fields=[
                ('basesegment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='segments.BaseSegment')),
            ],
            options={
                'verbose_name': 'Review Segment',
                'verbose_name_plural': 'Reviews Segments',
            },
            bases=('segments.basesegment',),
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_like', models.BooleanField(default=False, verbose_name='Is Like')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
                ('update_at', models.DateTimeField(auto_now=True, verbose_name='Update at')),
            ],
            options={
                'verbose_name': 'Like',
                'verbose_name_plural': 'Likes',
            },
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('basereview_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='reviews.BaseReview')),
                ('rate', models.FloatField(verbose_name='Rate')),
            ],
            options={
                'verbose_name': 'Review',
                'verbose_name_plural': 'Reviews',
            },
            bases=('reviews.basereview',),
        ),
        migrations.AddField(
            model_name='like',
            name='review_obj',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='reviews.BaseReview', verbose_name='Review'),
        ),
        migrations.AddField(
            model_name='like',
            name='user_obj',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User'),
        ),
        migrations.AddField(
            model_name='basereview',
            name='model_obj',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='review_obj', to='basemodels.BaseModel', verbose_name='Model'),
        ),
        migrations.AddField(
            model_name='basereview',
            name='parent_obj',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='child', to='reviews.BaseReview', verbose_name='Parent'),
        ),
        migrations.AddField(
            model_name='basereview',
            name='user_obj',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User'),
        ),
    ]
