# Generated by Django 3.0.8 on 2020-10-09 19:47

import business.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BusinessCategories',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('soft_delete', models.BooleanField(default=False)),
                ('categoria', models.TextField(default='', max_length=255)),
                ('descripcion', models.TextField(default='', max_length=255)),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
                'db_table': 'business_categories',
                'ordering': ('pk',),
            },
        ),
        migrations.CreateModel(
            name='UserBusiness',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('soft_delete', models.BooleanField(default=False)),
                ('nombre_local', models.CharField(default='', max_length=255)),
                ('logo', models.ImageField(blank=True, default='default/business.png', null=True, upload_to=business.models.UserBusiness.get_upload_to)),
                ('direccion', models.CharField(max_length=500)),
                ('telefono', models.CharField(max_length=20)),
                ('created_at', models.DateField(default=django.utils.timezone.now, editable=False)),
                ('updated_at', models.DateTimeField()),
                ('categoria', models.ForeignKey(default=12, on_delete=django.db.models.deletion.CASCADE, to='business.BusinessCategories')),
                ('fk_user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Business',
                'verbose_name_plural': 'Users Business',
                'db_table': 'user_business',
                'ordering': ('pk',),
                'unique_together': {('fk_user', 'nombre_local')},
            },
        ),
        migrations.CreateModel(
            name='Ofertas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('soft_delete', models.BooleanField(default=False)),
                ('titulo', models.CharField(default='', max_length=255)),
                ('descripcion', models.TextField(default='', max_length=255)),
                ('precio', models.FloatField(default=0.0)),
                ('porcentaje', models.IntegerField(default=0)),
                ('cantidad', models.IntegerField(default=1)),
                ('moneda', models.PositiveIntegerField(choices=[(1, 'Bolivares'), (2, 'Dolares')], default=4)),
                ('img', models.ImageField(blank=True, default='default/oferta.png', null=True, upload_to=business.models.Ofertas.get_upload_to)),
                ('deshabilitado', models.BooleanField(default=False)),
                ('created_at', models.DateField(default=django.utils.timezone.now, editable=False)),
                ('updated_at', models.DateTimeField()),
                ('fk_business', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='business_oferta', to='business.UserBusiness')),
            ],
            options={
                'verbose_name': 'User Offer',
                'verbose_name_plural': 'User Offers',
                'db_table': 'business_offer',
                'ordering': ('pk',),
                'unique_together': {('fk_business', 'titulo')},
            },
        ),
    ]
