# Generated by Django 2.0 on 2018-07-06 16:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='PUCategoryService',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('slug', models.SlugField()),
            ],
            options={
                'db_table': 'pu_category_service',
            },
        ),
        migrations.CreateModel(
            name='PUCustomerService',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('ext_id', models.CharField(blank=True, max_length=32, null=True)),
                ('data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
            ],
            options={
                'db_table': 'pu_cservice',
                'permissions': (('view_cservice', 'View cservice'),),
            },
        ),
        migrations.CreateModel(
            name='PUCustomerServiceHostingUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('full_name', models.CharField(max_length=100, verbose_name='Nombre completo')),
                ('username', models.CharField(max_length=100, verbose_name='Dirección e-mail')),
                ('data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
                ('cservice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hostingusers', to='services.PUCustomerService')),
            ],
            options={
                'db_table': 'pu_cservice_hosting_user',
            },
        ),
        migrations.CreateModel(
            name='PUCustomerServiceLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('message', models.TextField()),
                ('cservice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='services.PUCustomerService')),
            ],
            options={
                'db_table': 'pu_cservice_log',
            },
        ),
        migrations.CreateModel(
            name='PUService',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('ext_id', models.CharField(blank=True, max_length=128, null=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='services.PUCategoryService')),
            ],
            options={
                'db_table': 'pu_service',
            },
        ),
        migrations.AddField(
            model_name='pucustomerservice',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='services.PUService'),
        ),
    ]
