# Generated by Django 3.1.4 on 2021-01-25 18:33

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Printer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('api_key', models.CharField(max_length=50)),
                ('check_type', models.CharField(choices=[('kitchen', 'kitchen'), ('client', 'client')], max_length=100)),
                ('point_id', models.IntegerField()),
            ],
            options={
                'verbose_name': 'Принтер',
                'verbose_name_plural': 'Принтеры',
            },
        ),
        migrations.CreateModel(
            name='Check',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('kitchen', 'kitchen'), ('client', 'client')], max_length=100)),
                ('order', models.JSONField()),
                ('status', models.CharField(choices=[('new', 'new'), ('rendered', 'rendered'), ('printed', 'printed')], max_length=100)),
                ('pdf_file', models.FileField(upload_to='media/pdf/')),
                ('printer_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='checks.printer')),
            ],
            options={
                'verbose_name': 'Чек',
                'verbose_name_plural': 'Чеки',
            },
        ),
    ]
