# Generated by Django 3.1.3 on 2020-11-09 19:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Endereco',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('logradouro', models.CharField(max_length=60, verbose_name='Endereço')),
                ('numero', models.CharField(max_length=10, verbose_name='Número')),
                ('complemento', models.CharField(max_length=50, verbose_name='Complemento')),
                ('cidade', models.CharField(max_length=30, verbose_name='Cidade')),
                ('estado', models.CharField(max_length=2, verbose_name='Estado')),
                ('pais', models.CharField(max_length=30, verbose_name='País')),
            ],
        ),
        migrations.CreateModel(
            name='Parcelamento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codigo', models.CharField(max_length=12, verbose_name='Código')),
                ('valorParcela', models.DecimalField(decimal_places=2, max_digits=8)),
            ],
        ),
        migrations.CreateModel(
            name='Telefone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(choices=[('cel', 'celular'), ('res', 'residencial'), ('com', 'comercial')], max_length=3)),
                ('numero', models.CharField(max_length=12)),
            ],
        ),
        migrations.CreateModel(
            name='Vendedor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=40, verbose_name='Nome: ')),
                ('endereco', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loja.endereco')),
                ('telefone', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loja.telefone')),
            ],
            options={
                'ordering': ['nome'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Gerente',
            fields=[
                ('vendedor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='loja.vendedor')),
            ],
            options={
                'ordering': ['nome'],
                'abstract': False,
            },
            bases=('loja.vendedor',),
        ),
        migrations.CreateModel(
            name='SocialMedia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=40, verbose_name='Nome: ')),
                ('endereco', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loja.endereco')),
                ('telefone', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loja.telefone')),
            ],
            options={
                'ordering': ['nome'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Produto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codigo', models.CharField(max_length=12, verbose_name='Código')),
                ('descricao', models.CharField(max_length=144, verbose_name='Descrição do produto')),
                ('preco', models.DecimalField(decimal_places=2, max_digits=8)),
                ('desconto', models.DecimalField(decimal_places=2, max_digits=4)),
                ('parcelamento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loja.parcelamento')),
            ],
        ),
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=40, verbose_name='Nome: ')),
                ('usuario', models.CharField(max_length=15, unique=True, verbose_name='Usuario')),
                ('senha', models.CharField(max_length=15, verbose_name='Senha: ')),
                ('endereco', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loja.endereco')),
                ('telefone', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loja.telefone')),
            ],
            options={
                'ordering': ['nome'],
                'abstract': False,
            },
        ),
    ]
