# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-20 14:25
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='Aluguel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dataAluguel', models.DateField()),
                ('dataPrevistaDevolucao', models.DateField()),
                ('dataDevolucao', models.DateField(null=True)),
                ('multa', models.FloatField(null=True)),
                ('valor', models.FloatField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=255)),
                ('dataNasc', models.DateField()),
                ('cpf', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='Filme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=255)),
                ('valor', models.FloatField()),
            ],
            options={
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='Funcionario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=255)),
                ('salario', models.FloatField()),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='funcionario', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='Genero',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao', models.CharField(max_length=255)),
            ],
            options={
                'ordering': ('descricao',),
            },
        ),
        migrations.AddField(
            model_name='filme',
            name='categoria',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='filmes', to='aluguel.Genero'),
        ),
        migrations.AddField(
            model_name='aluguel',
            name='cliente',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alugueis', to='aluguel.Cliente'),
        ),
        migrations.AddField(
            model_name='aluguel',
            name='filme',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alugueis', to='aluguel.Filme'),
        ),
        migrations.AddField(
            model_name='aluguel',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alugueis', to=settings.AUTH_USER_MODEL),
        ),
    ]
