# Generated by Django 2.0.13 on 2019-03-28 14:57

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Clientes',
            fields=[
                ('nome', models.CharField(max_length=80)),
                ('cpf', models.CharField(blank=True, max_length=11, primary_key=True, serialize=False, unique=True)),
                ('email', models.CharField(blank=True, max_length=80, null=True)),
                ('cep', models.CharField(max_length=13)),
            ],
            options={
                'verbose_name_plural': 'clientes',
                'managed': True,
                'db_table': 'Clientes',
                'verbose_name': 'cliente',
            },
        ),
        migrations.CreateModel(
            name='Empresas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idempresas', models.IntegerField(blank=True, db_column='idEmpresas', null=True)),
                ('nome', models.CharField(blank=True, max_length=45, null=True)),
            ],
            options={
                'verbose_name_plural': 'empresas',
                'managed': True,
                'db_table': 'Empresas',
                'verbose_name': 'empresa',
            },
        ),
        migrations.CreateModel(
            name='Premios',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.DateTimeField(default=django.utils.timezone.now)),
                ('baixado', models.BooleanField(default=False)),
                ('cliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='appcartaofidelidade.Clientes')),
            ],
            options={
                'verbose_name_plural': 'premios',
            },
        ),
        migrations.CreateModel(
            name='Registros',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.DateField()),
                ('cartao', models.TextField()),
                ('status', models.TextField()),
                ('cliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='appcartaofidelidade.Clientes')),
            ],
            options={
                'verbose_name_plural': 'registros',
                'managed': True,
                'db_table': 'Registros',
                'verbose_name': 'registro',
            },
        ),
        migrations.CreateModel(
            name='Servicos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idempresa', models.IntegerField(blank=True, db_column='idEmpresa', null=True)),
                ('descricao', models.CharField(max_length=200)),
                ('validade', models.DateField()),
                ('entradas', models.IntegerField(default=10)),
                ('empresas_idempresas', models.IntegerField(db_column='Empresas_idEmpresas')),
                ('premio', models.TextField()),
            ],
            options={
                'verbose_name_plural': 'serviços',
                'managed': True,
                'db_table': 'Servicos',
                'verbose_name': 'serviço',
            },
        ),
        migrations.AddField(
            model_name='registros',
            name='servicos',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='appcartaofidelidade.Servicos'),
        ),
        migrations.AddField(
            model_name='premios',
            name='servico',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='appcartaofidelidade.Servicos'),
        ),
    ]
