# Generated by Django 3.2.5 on 2021-07-12 14:56

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('status', '0002_status_init_data'),
    ]

    operations = [
        migrations.CreateModel(
            name='Modulos',
            fields=[
                ('modulo_id', models.IntegerField(primary_key=True, serialize=False)),
                ('modulo', models.CharField(max_length=150)),
                ('modulo_txt', models.CharField(max_length=150)),
                ('enabled', models.BooleanField(default=True)),
                ('position', models.IntegerField(default=0)),
                ('grupo', models.IntegerField(default=0)),
            ],
            options={
                'db_table': 'modulos',
            },
        ),
        migrations.CreateModel(
            name='Perfiles',
            fields=[
                ('perfil_id', models.IntegerField(primary_key=True, serialize=False)),
                ('perfil', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'perfiles',
            },
        ),
        migrations.CreateModel(
            name='UsersPerfiles',
            fields=[
                ('user_perfil_id', models.AutoField(primary_key=True, serialize=False)),
                ('punto_id', models.IntegerField()),
                ('caja_id', models.IntegerField()),
                ('notificacion', models.IntegerField(default=0)),
                ('created_at', utils.custome_db_types.DateTimeFieldCustome(blank=True, null=True)),
                ('updated_at', utils.custome_db_types.DateTimeFieldCustome(blank=True, null=True)),
                ('deleted_at', utils.custome_db_types.DateTimeFieldCustome(blank=True, null=True)),
                ('perfil_id', models.ForeignKey(db_column='perfil_id', on_delete=django.db.models.deletion.PROTECT, to='permisos.perfiles')),
                ('status_id', models.ForeignKey(db_column='status_id', on_delete=django.db.models.deletion.PROTECT, to='status.status')),
                ('user_id', models.ForeignKey(db_column='user_id', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'users_perfiles',
            },
        ),
        migrations.CreateModel(
            name='UsersModulos',
            fields=[
                ('user_modulo_id', models.AutoField(primary_key=True, serialize=False)),
                ('enabled', models.BooleanField(default=False)),
                ('adicionar', models.BooleanField(default=False)),
                ('modificar', models.BooleanField(default=False)),
                ('eliminar', models.BooleanField(default=False)),
                ('anular', models.BooleanField(default=False)),
                ('imprimir', models.BooleanField(default=False)),
                ('permiso', models.BooleanField(default=False)),
                ('modulo_id', models.ForeignKey(db_column='modulo_id', on_delete=django.db.models.deletion.PROTECT, to='permisos.modulos')),
                ('user_perfil_id', models.ForeignKey(db_column='user_perfil_id', on_delete=django.db.models.deletion.PROTECT, to='permisos.usersperfiles')),
            ],
            options={
                'db_table': 'users_modulos',
            },
        ),
    ]
