# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-02 03:19
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Atendente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=20)),
                ('name', models.CharField(max_length=50)),
                ('rg', models.CharField(max_length=11)),
                ('cpf', models.CharField(max_length=11)),
                ('salary', models.DecimalField(decimal_places=2, max_digits=5)),
                ('service_count', models.IntegerField()),
                ('hired_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Cardapio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tel', models.CharField(max_length=11)),
                ('name', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=100)),
                ('call_count', models.IntegerField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Motoqueiro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('rg', models.CharField(max_length=11)),
                ('cpf', models.CharField(max_length=11)),
                ('salary', models.DecimalField(decimal_places=2, max_digits=5)),
                ('service_count', models.IntegerField()),
                ('hired_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Pedido',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField()),
                ('asked_at', models.DateTimeField(auto_now_add=True)),
                ('delivered_at', models.DateTimeField(auto_now=True, null=True)),
                ('deliver_prediction', models.DateTimeField(blank=True, null=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CRUD.Cliente')),
                ('deliveryman', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CRUD.Motoqueiro')),
            ],
        ),
        migrations.CreateModel(
            name='Preferencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Produto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=50)),
                ('price', models.DecimalField(decimal_places=2, max_digits=4)),
                ('type', models.IntegerField()),
            ],
        ),
        migrations.AddField(
            model_name='preferencia',
            name='products',
            field=models.ManyToManyField(to='CRUD.Produto'),
        ),
        migrations.AddField(
            model_name='pedido',
            name='products',
            field=models.ManyToManyField(to='CRUD.Produto'),
        ),
        migrations.AddField(
            model_name='cliente',
            name='preference',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='CRUD.Preferencia'),
        ),
        migrations.AddField(
            model_name='cardapio',
            name='products',
            field=models.ManyToManyField(to='CRUD.Produto'),
        ),
    ]
