# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-06 11:05
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='PlanoSaude',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao', models.CharField(max_length=30, unique=True, verbose_name='Descrição')),
            ],
            options={
                'verbose_name': 'Plano de Saúde',
                'verbose_name_plural': 'Planos de Saúde',
            },
        ),
        migrations.CreateModel(
            name='Telefone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(choices=[('FIXO', 'FIXO'), ('CELULAR', 'CELULAR')], max_length=7, verbose_name='Tipo Telefone')),
                ('ddd', models.CharField(max_length=2, verbose_name='DDD')),
                ('numero', models.CharField(max_length=10, verbose_name='Número')),
                ('principal', models.CharField(choices=[(None, '----'), (False, 'Não'), (True, 'Sim')], max_length=10, verbose_name='Telefone Principal?')),
            ],
            options={
                'verbose_name': 'Telefone',
                'verbose_name_plural': 'Telefones',
            },
        ),
        migrations.CreateModel(
            name='TipoUsuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao', models.CharField(max_length=30, unique=True, verbose_name='Descrição')),
            ],
            options={
                'verbose_name': 'Tipo de Usuário',
                'verbose_name_plural': 'Tipos de Usuários',
            },
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='Nome')),
                ('data_nascimento', models.DateField(blank=True, null=True, verbose_name='Data Nascimento')),
                ('sexo', models.CharField(choices=[('F', 'Feminino'), ('M', 'Masculino'), ('O', 'Outro')], max_length=1, verbose_name='Sexo')),
                ('data_cadastro', models.DateField(auto_now_add=True)),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='Email')),
                ('username', models.CharField(max_length=20, unique=True, verbose_name='Nome de Usuário')),
                ('plano', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='usuarios.PlanoSaude', verbose_name='Plano de Saúde')),
                ('primeiro_telefone', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='primeiro_telefone', to='usuarios.Telefone')),
                ('segundo_telefone', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='segundo_telefone', to='usuarios.Telefone')),
                ('tipo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='usuarios.TipoUsuario', verbose_name='Tipo de Usuário')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Usuário',
                'ordering': ['nome', 'tipo'],
                'verbose_name_plural': 'Usuários',
            },
        ),
    ]
