# Generated by Django 3.1.2 on 2020-10-28 05:22

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('commerce', '0002_auto_20201028_0519'),
    ]

    operations = [
        migrations.CreateModel(
            name='Place',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now_add=True, verbose_name='modified at')),
                ('name', models.CharField(max_length=150)),
                ('description', models.CharField(blank=True, max_length=350, null=True)),
                ('region', models.CharField(max_length=150)),
                ('province', models.CharField(max_length=150)),
                ('commune', models.CharField(max_length=150)),
                ('latitud', models.FloatField(blank=True, null=True)),
                ('longitude', models.FloatField(blank=True, null=True)),
                ('banner_image', models.ImageField(blank=True, null=True, upload_to='')),
                ('principal_image', models.ImageField(blank=True, null=True, upload_to='')),
                ('gallery_one', models.ImageField(blank=True, null=True, upload_to='')),
                ('gallery_two', models.ImageField(blank=True, null=True, upload_to='')),
                ('gallery_three', models.ImageField(blank=True, null=True, upload_to='')),
                ('rating', models.FloatField(blank=True, default=0.0, null=True)),
                ('enterprise', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='enterprise_place', to='commerce.enterprise')),
            ],
            options={
                'ordering': ['-created', '-modified'],
                'get_latest_by': ('created',),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now_add=True, verbose_name='modified at')),
                ('rating', models.IntegerField(default=1)),
                ('commentary', models.TextField(blank=True, max_length=600, null=True)),
                ('is_auth', models.BooleanField(blank=True, default=False, null=True)),
                ('is_visit', models.BooleanField(blank=True, default=True, null=True)),
                ('place', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='rated_place', to='commerce.place')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='owner_rated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created', '-modified'],
                'get_latest_by': ('created',),
                'abstract': False,
            },
        ),
    ]
