<reponame>adeus54/IonicTest
# Generated by Django 2.2.7 on 2020-01-09 10:11

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Estado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='FichaEmergencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(default='', max_length=150)),
                ('telefono', models.CharField(default='', max_length=10)),
                ('tipollamada', models.CharField(choices=[(1, 'Celular'), (2, 'Telefono Fijo')], default=1, max_length=10)),
                ('fecha_e', models.DateField()),
                ('hora', models.TimeField()),
                ('provincia', models.CharField(default='', max_length=25)),
                ('canton', models.CharField(default='', max_length=30)),
                ('direccionReporte', models.CharField(default='', max_length=50)),
                ('direccionIncidente', models.CharField(default='', max_length=50)),
                ('description', models.TextField()),
                ('operador', models.CharField(default='', max_length=50)),
                ('reportador', models.CharField(default='', max_length=50)),
                ('alerta', models.CharField(choices=[(1, 'Clave Amarilla'), (2, 'Clave Roja')], default=2, max_length=30)),
                ('coorX', models.FloatField()),
                ('coorY', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Institucion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('description', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Recurso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('unidad', models.CharField(max_length=100)),
                ('institucion', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='Institucion', to='Myapi.Institucion')),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('id_user', models.CharField(max_length=10, primary_key=True, serialize=False, unique=True)),
                ('first_name', models.CharField(max_length=100)),
                ('username', models.CharField(max_length=100, unique=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('institucion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Myapi.Institucion')),
                ('recurso', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Recurso', to='Myapi.Recurso')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Retroalimentacion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Descripcion', models.CharField(max_length=100)),
                ('fecha_r', models.DateField()),
                ('hora', models.TimeField()),
                ('estado', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Estado', to='Myapi.Estado')),
                ('idemrg', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ficha', to='Myapi.FichaEmergencia')),
                ('usuario', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='reporta', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AsignacionEmergencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('asignacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Usuario', to=settings.AUTH_USER_MODEL)),
                ('emergencia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='FichEmergencia', to='Myapi.FichaEmergencia')),
            ],
        ),
    ]

# Generated by Django 2.2.7 on 2020-01-09 10:11

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Estado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='FichaEmergencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(default='', max_length=150)),
                ('telefono', models.CharField(default='', max_length=10)),
                ('tipollamada', models.CharField(choices=[(1, 'Celular'), (2, 'Telefono Fijo')], default=1, max_length=10)),
                ('fecha_e', models.DateField()),
                ('hora', models.TimeField()),
                ('provincia', models.CharField(default='', max_length=25)),
                ('canton', models.CharField(default='', max_length=30)),
                ('direccionReporte', models.CharField(default='', max_length=50)),
                ('direccionIncidente', models.CharField(default='', max_length=50)),
                ('description', models.TextField()),
                ('operador', models.CharField(default='', max_length=50)),
                ('reportador', models.CharField(default='', max_length=50)),
                ('alerta', models.CharField(choices=[(1, 'Clave Amarilla'), (2, 'Clave Roja')], default=2, max_length=30)),
                ('coorX', models.FloatField()),
                ('coorY', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Institucion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('description', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Recurso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('unidad', models.CharField(max_length=100)),
                ('institucion', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='Institucion', to='Myapi.Institucion')),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('id_user', models.CharField(max_length=10, primary_key=True, serialize=False, unique=True)),
                ('first_name', models.CharField(max_length=100)),
                ('username', models.CharField(max_length=100, unique=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('institucion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Myapi.Institucion')),
                ('recurso', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Recurso', to='Myapi.Recurso')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Retroalimentacion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Descripcion', models.CharField(max_length=100)),
                ('fecha_r', models.DateField()),
                ('hora', models.TimeField()),
                ('estado', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Estado', to='Myapi.Estado')),
                ('idemrg', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ficha', to='Myapi.FichaEmergencia')),
                ('usuario', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='reporta', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AsignacionEmergencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('asignacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Usuario', to=settings.AUTH_USER_MODEL)),
                ('emergencia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='FichEmergencia', to='Myapi.FichaEmergencia')),
            ],
        ),
    ]
# Generated by Django 2.2.7 on 2020-01-09 10:11