# Generated by Django 3.1.2 on 2020-12-18 01:38

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='NivelUsuario',
            fields=[
                ('idnivelusuario', models.AutoField(primary_key=True, serialize=False)),
                ('descricao', models.CharField(max_length=100)),
                ('ativo', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='PrioridadeChamado',
            fields=[
                ('idprioridadechamado', models.AutoField(primary_key=True, serialize=False)),
                ('descprioridade', models.CharField(max_length=20)),
                ('tempo', models.IntegerField()),
                ('ativo', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='SistemaCidadeSuporte',
            fields=[
                ('idsistemacidadesuporte', models.AutoField(primary_key=True, serialize=False)),
                ('nome', models.CharField(max_length=100)),
                ('link', models.CharField(max_length=50)),
                ('servidor', models.CharField(max_length=50)),
                ('ipservidor', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='SituacaoChamado',
            fields=[
                ('idsituacaochamado', models.AutoField(primary_key=True, serialize=False)),
                ('descsituacao', models.CharField(max_length=20)),
                ('ativo', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('idusuario', models.AutoField(primary_key=True, serialize=False)),
                ('nome', models.CharField(max_length=100)),
                ('cpf', models.CharField(max_length=14, unique=True)),
                ('datanascimento', models.DateField()),
                ('sexo', models.CharField(blank=True, choices=[('M', 'MASCULINO'), ('F', 'FEMININO')], max_length=1)),
                ('email', models.CharField(max_length=100)),
                ('telefone', models.CharField(max_length=12)),
                ('endereco', models.CharField(max_length=100)),
                ('idnivelusuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dgtask.nivelusuario')),
            ],
        ),
        migrations.CreateModel(
            name='MensagemChamado',
            fields=[
                ('idmensagemchamado', models.AutoField(primary_key=True, serialize=False)),
                ('mensagem', models.CharField(max_length=100)),
                ('idusuariocriou', models.IntegerField()),
                ('dataregistro', models.DateField(auto_now=True)),
                ('lido', models.BooleanField(default=False)),
                ('idusuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dgtask.usuario')),
            ],
        ),
        migrations.CreateModel(
            name='Chamado',
            fields=[
                ('idchamado', models.AutoField(primary_key=True, serialize=False)),
                ('mensagem', models.CharField(max_length=250, null=True)),
                ('data', models.DateField(null=True)),
                ('comentario', models.CharField(max_length=100)),
                ('lido', models.BooleanField(default=False)),
                ('idusuariocriou', models.IntegerField(null=True)),
                ('dataregistro', models.DateField(auto_now=True)),
                ('ativo', models.BooleanField(default=True)),
                ('idprioridadechamado', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dgtask.prioridadechamado')),
                ('idsistemacidadesuporte', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dgtask.sistemacidadesuporte')),
                ('idsituacaochamado', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dgtask.situacaochamado')),
                ('idusuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dgtask.usuario')),
            ],
        ),
    ]
