# Generated by Django 2.0.13 on 2019-08-06 08:26

import apps.empresas.models
from django.db import migrations, models
import django.db.models.deletion
import django_tenants.postgresql_backend.base


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dominio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('domain', models.CharField(db_index=True, max_length=253, unique=True)),
                ('is_primary', models.BooleanField(default=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Empresa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('schema_name', models.CharField(max_length=63, unique=True, validators=[django_tenants.postgresql_backend.base._check_schema_name])),
                ('nombre', models.CharField(max_length=100, verbose_name='nombre de la empresa')),
                ('sobre_nosotros', models.TextField(verbose_name='sobre nosotros (descripción de su negocio)*')),
                ('eslogan', models.CharField(max_length=100, verbose_name='eslogan de su negocio*')),
                ('email', models.EmailField(max_length=254, verbose_name='correo electrónico del negocio*')),
                ('direccion', models.CharField(max_length=100, verbose_name='dirección del negocio*')),
                ('telefono', models.CharField(max_length=100, verbose_name='teléfono del negocio*')),
                ('logo', models.ImageField(blank=True, upload_to=apps.empresas.models.crear_ruta_logo, verbose_name='logo del negocio')),
                ('creado', models.DateField(auto_now_add=True)),
            ],
            options={
                'permissions': (('gestionar_empresas', 'Gestión de empresas'),),
            },
        ),
        migrations.AddField(
            model_name='dominio',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='domains', to='empresas.Empresa'),
        ),
    ]
