# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import datetime
import django.db.models.deletion
from django.conf import settings
import django.core.validators


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Bank',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Bicycle',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('model', models.CharField(max_length=255)),
                ('year', models.DateField(null=True, blank=True)),
                ('color', models.CharField(max_length=255)),
                ('sizes', models.CommaSeparatedIntegerField(max_length=10)),
                ('photo', models.ImageField(max_length=255, null=True, upload_to=b'media/upload/bicycle/', blank=True)),
                ('offsite_url', models.URLField(null=True, blank=True)),
                ('weight', models.FloatField()),
                ('price', models.FloatField()),
                ('sale', models.FloatField(default=0, null=True, blank=True)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['brand', 'year', 'type', 'model', 'price'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Bicycle_Order',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('size', models.CharField(max_length=50)),
                ('price', models.FloatField()),
                ('sale', models.IntegerField()),
                ('prepay', models.FloatField()),
                ('date', models.DateField(auto_now_add=True)),
                ('done', models.BooleanField(default=False)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['-date', 'client', 'model'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Bicycle_Sale',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('price', models.FloatField()),
                ('sale', models.IntegerField()),
                ('date', models.DateField()),
                ('service', models.BooleanField(default=False)),
                ('description', models.TextField(null=True, blank=True)),
                ('sum', models.FloatField(null=True, blank=True)),
            ],
            options={
                'ordering': ['client', 'model', 'date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Bicycle_Store',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('serial_number', models.CharField(max_length=50)),
                ('price', models.FloatField()),
                ('count', models.PositiveIntegerField()),
                ('realization', models.BooleanField(default=False)),
                ('date', models.DateField(auto_now_add=True)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['model'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Bicycle_Type',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('type', models.CharField(max_length=255)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['type'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='CashType',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=100)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('ids', models.CharField(unique=True, max_length=50, verbose_name=b'code')),
                ('dealer_code', models.CharField(max_length=50, null=True, verbose_name=b'dealer code', blank=True)),
                ('name', models.CharField(max_length=255)),
                ('weight', models.FloatField(null=True, blank=True)),
                ('photo', models.FileField(null=True, upload_to=b'media/upload/catalog/%Y/%m/%d', blank=True)),
                ('year', models.IntegerField(null=True, blank=True)),
                ('sale_to', models.DateField(auto_now_add=True)),
                ('color', models.CharField(max_length=255, null=True, blank=True)),
                ('price', models.FloatField()),
                ('last_price', models.FloatField(null=True, blank=True)),
                ('rating', models.FloatField(null=True, blank=True)),
                ('sale', models.FloatField()),
                ('count', models.IntegerField()),
                ('length', models.FloatField(null=True, blank=True)),
                ('last_update', models.DateTimeField(null=True, blank=True)),
                ('description', models.CharField(max_length=255)),
                ('locality', models.CharField(max_length=50, null=True, verbose_name=b'locality', blank=True)),
                ('show', models.BooleanField(default=False, verbose_name=b'\xd0\xa1\xd1\x82\xd0\xb0\xd1\x82\xd1\x83\xd1\x81 \xd0\xb2\xd1\x96\xd0\xb4\xd0\xbe\xd0\xb1\xd1\x80\xd0\xb0\xd0\xb6\xd0\xb5\xd0\xbd\xd0\xbd\xd1\x8f')),
            ],
            options={
                'ordering': ['type'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Check',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('check_num', models.IntegerField(verbose_name=b'mini-fp')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('count', models.FloatField(default=1.0, verbose_name=b'how many something')),
                ('discount', models.IntegerField(default=0, verbose_name=b'%')),
                ('price', models.FloatField()),
                ('description', models.CharField(max_length=255, null=True, blank=True)),
                ('print_status', models.BooleanField(default=False)),
                ('bicycle', models.ForeignKey(blank=True, to='accounting.Bicycle_Sale', null=True)),
                ('cash_type', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='accounting.CashType', null=True)),
            ],
            options={
                'ordering': ['date', 'check_num'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='CheckPay',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('check_num', models.IntegerField(verbose_name=b'mini-fp')),
                ('cash', models.FloatField()),
                ('term', models.FloatField()),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('description', models.CharField(max_length=255)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['check_num'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('forumname', models.CharField(max_length=255)),
                ('city', models.CharField(max_length=255)),
                ('email', models.CharField(max_length=100)),
                ('phone', models.CharField(max_length=100)),
                ('phone1', models.CharField(max_length=100, null=True, blank=True)),
                ('sale', models.IntegerField(default=0, verbose_name=b'how many percent for sale')),
                ('summ', models.FloatField()),
                ('birthday', models.DateField(null=True, blank=True)),
                ('sale_on', models.BooleanField(default=True, verbose_name=b'\xd0\x97\xd0\xbd\xd0\xb8\xd0\xb6\xd0\xba\xd0\xb0 \xd0\xb2\xd0\xba\xd0\xbb\xd1\x8e\xd1\x87\xd0\xb5\xd0\xbd\xd0\xb0')),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ClientCredits',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateTimeField()),
                ('price', models.FloatField()),
                ('description', models.TextField()),
                ('cash_type', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='accounting.CashType', null=True)),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['client', 'date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ClientDebts',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateTimeField()),
                ('price', models.FloatField()),
                ('cash', models.BooleanField(default=False, verbose_name=b'\xd0\x9a\xd0\xb0\xd1\x81\xd0\xb0?')),
                ('description', models.TextField()),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['client', 'date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ClientInvoice',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('count', models.FloatField()),
                ('price', models.FloatField(null=True, blank=True)),
                ('sum', models.FloatField()),
                ('sale', models.IntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(0)])),
                ('pay', models.FloatField(null=True, blank=True)),
                ('date', models.DateTimeField()),
                ('description', models.TextField(null=True, blank=True)),
                ('chk_del', models.BooleanField(default=False, verbose_name=b'\xd0\x9c\xd1\x96\xd1\x82\xd0\xba\xd0\xb0 \xd0\xbd\xd0\xb0 \xd0\xb2\xd0\xb8\xd0\xb4\xd0\xb0\xd0\xbb\xd0\xb5\xd0\xbd\xd0\xbd\xd1\x8f')),
                ('catalog', models.ForeignKey(to='accounting.Catalog')),
                ('client', models.ForeignKey(to='accounting.Client')),
            ],
            options={
                'ordering': ['client', 'catalog', 'date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ClientMessage',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('msg', models.TextField(null=True, blank=True)),
                ('status', models.BooleanField(default=False, verbose_name=b'\xd0\x92\xd0\xb8\xd0\xba\xd0\xbe\xd0\xbd\xd0\xb0\xd0\xbd\xd0\xbe?')),
                ('date', models.DateField(auto_now_add=True)),
                ('ddate', models.DateTimeField()),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('duser', models.ForeignKey(related_name=b'duser', on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['client', '-date', 'status'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ClientOrder',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('description', models.TextField(null=True, blank=True)),
                ('count', models.IntegerField()),
                ('price', models.FloatField(null=True, blank=True)),
                ('sum', models.FloatField()),
                ('pay', models.FloatField(default=0, null=True, blank=True)),
                ('date', models.DateTimeField()),
                ('status', models.BooleanField(default=False, verbose_name=b'\xd0\xa1\xd1\x82\xd0\xb0\xd1\x82\xd1\x83\xd1\x81?')),
                ('catalog', models.ForeignKey(blank=True, to='accounting.Catalog', null=True)),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('credit', models.ForeignKey(blank=True, to='accounting.ClientCredits', null=True)),
            ],
            options={
                'ordering': ['status', '-date', 'client'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ClientReturn',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('count', models.IntegerField(default=0)),
                ('sum', models.FloatField(default=0, null=True, blank=True)),
                ('buy_date', models.DateTimeField()),
                ('msg', models.TextField(null=True, blank=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('cash', models.BooleanField(default=True)),
                ('buy_user', models.ForeignKey(related_name=b'buy_user', on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
                ('catalog', models.ForeignKey(to='accounting.Catalog')),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date', 'client'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Costs',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('price', models.FloatField()),
                ('description', models.TextField()),
            ],
            options={
                'ordering': ['date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='CostType',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField()),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Currency',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('ids', models.CharField(max_length=50, verbose_name=b'code')),
                ('ids_char', models.CharField(unique=True, max_length=5, verbose_name=b'code')),
                ('name', models.CharField(max_length=50, verbose_name=b'currency name')),
                ('country', models.ForeignKey(to='accounting.Country')),
            ],
            options={
                'ordering': ['ids'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Dealer',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('city', models.CharField(max_length=255)),
                ('street', models.CharField(max_length=255)),
                ('www', models.URLField(null=True, blank=True)),
                ('description', models.TextField(null=True, blank=True)),
                ('director', models.CharField(max_length=255, null=True, blank=True)),
                ('country', models.ForeignKey(to='accounting.Country')),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='DealerInvoice',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('origin_id', models.CharField(max_length=255)),
                ('date', models.DateField()),
                ('price', models.FloatField()),
                ('file', models.CharField(max_length=255)),
                ('received', models.BooleanField(default=False, verbose_name=b'\xd0\xa2\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80 \xd0\xbe\xd1\x82\xd1\x80\xd0\xb8\xd0\xbc\xd0\xb0\xd0\xbd\xd0\xbe?')),
                ('payment', models.BooleanField(default=False, verbose_name=b'\xd0\x9e\xd0\xbf\xd0\xbb\xd0\xb0\xd1\x87\xd0\xb5\xd0\xbd\xd0\xbe?')),
                ('description', models.TextField(null=True, blank=True)),
                ('company', models.ForeignKey(to='accounting.Dealer')),
                ('currency', models.ForeignKey(to='accounting.Currency')),
            ],
            options={
                'ordering': ['payment', 'company', 'manager', 'date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='DealerManager',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('email', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('phone', models.CharField(max_length=100)),
                ('company', models.ForeignKey(to='accounting.Dealer')),
            ],
            options={
                'ordering': ['company', 'name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='DealerPayment',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('invoice_number', models.CharField(max_length=255, null=True)),
                ('date', models.DateField(auto_now_add=True)),
                ('price', models.FloatField()),
                ('letter', models.BooleanField(default=False, verbose_name=b'\xd0\x9b\xd0\xb8\xd1\x81\xd1\x82 \xd0\xb2\xd1\x96\xd0\xb4\xd0\xbf\xd1\x80\xd0\xb0\xd0\xb2\xd0\xbb\xd0\xb5\xd0\xbd\xd0\xbe?')),
                ('description', models.TextField(null=True, blank=True)),
                ('bank', models.ForeignKey(to='accounting.Bank')),
                ('currency', models.ForeignKey(to='accounting.Currency')),
                ('dealer_invoice', models.ForeignKey(to='accounting.DealerInvoice')),
            ],
            options={
                'ordering': ['date', 'invoice_number'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Discount',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('manufacture_id', models.IntegerField()),
                ('type_id', models.IntegerField()),
                ('date_start', models.DateField(auto_now_add=True)),
                ('date_end', models.DateField()),
                ('sale', models.FloatField()),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['name', 'sale', 'date_end'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Exchange',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateTimeField()),
                ('value', models.DecimalField(verbose_name=b'money', max_digits=5, decimal_places=2)),
                ('currency', models.ForeignKey(to='accounting.Currency')),
            ],
            options={
                'ordering': ['date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='FrameSize',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=100)),
                ('cm', models.FloatField()),
                ('inch', models.FloatField()),
            ],
            options={
                'ordering': ['inch', 'name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='InventoryList',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('count', models.IntegerField()),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('edit_date', models.DateTimeField(null=True, blank=True)),
                ('description', models.TextField(null=True, blank=True)),
                ('real_count', models.IntegerField()),
                ('check_all', models.BooleanField(default=False, verbose_name=b'\xd0\x97\xd0\xb0\xd0\xb3\xd0\xb0\xd0\xbb\xd1\x8c\xd0\xbd\xd0\xb0 \xd0\xba\xd1\x96\xd0\xbb\xd1\x8c\xd0\xba\xd1\x96\xd1\x81\xd1\x82\xd1\x8c?')),
                ('chk_del', models.BooleanField(default=False, verbose_name=b'\xd0\x9c\xd1\x96\xd1\x82\xd0\xba\xd0\xb0 \xd0\xbd\xd0\xb0 \xd0\xb2\xd0\xb8\xd0\xb4\xd0\xb0\xd0\xbb\xd0\xb5\xd0\xbd\xd0\xbd\xd1\x8f')),
                ('catalog', models.ForeignKey(to='accounting.Catalog')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['date', 'catalog', 'count'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='InvoiceComponentList',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('count', models.IntegerField()),
                ('price', models.FloatField()),
                ('date', models.DateField()),
                ('rcount', models.IntegerField(null=True, blank=True)),
                ('description', models.TextField(null=True, blank=True)),
                ('catalog', models.ForeignKey(to='accounting.Catalog')),
                ('currency', models.ForeignKey(to='accounting.Currency')),
                ('invoice', models.ForeignKey(to='accounting.DealerInvoice')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['invoice', 'catalog', 'price', 'date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Manufacturer',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=100)),
                ('www', models.URLField(null=True, blank=True)),
                ('logo', models.ImageField(null=True, upload_to=b'media/upload/', blank=True)),
                ('description', models.TextField(null=True, blank=True)),
                ('country', models.ForeignKey(to='accounting.Country', null=True)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='PhoneStatus',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('url', models.CharField(max_length=255)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('description', models.TextField(null=True, blank=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['date', 'description'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='PreOrder',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateField(auto_now_add=True)),
                ('date_pay', models.DateField()),
                ('date_delivery', models.DateField()),
                ('price', models.FloatField()),
                ('price_pay', models.FloatField()),
                ('file', models.CharField(max_length=255)),
                ('received', models.BooleanField(default=False, verbose_name=b'\xd0\xa2\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80 \xd0\xbe\xd1\x82\xd1\x80\xd0\xb8\xd0\xbc\xd0\xb0\xd0\xbd\xd0\xbe?')),
                ('payment', models.BooleanField(default=False, verbose_name=b'\xd0\x9e\xd0\xbf\xd0\xbb\xd0\xb0\xd1\x87\xd0\xb5\xd0\xbd\xd0\xbe?')),
                ('description', models.TextField(null=True, blank=True)),
                ('company', models.ForeignKey(to='accounting.Dealer')),
                ('currency', models.ForeignKey(to='accounting.Currency')),
                ('manager', models.ForeignKey(blank=True, to='accounting.DealerManager', null=True)),
            ],
            options={
                'ordering': ['company', 'manager', 'date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Rent',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date_start', models.DateTimeField(auto_now_add=True)),
                ('date_end', models.DateField(default=datetime.date(2017, 11, 4))),
                ('count', models.IntegerField(default=1)),
                ('deposit', models.FloatField(default=0, null=True, blank=True)),
                ('status', models.BooleanField(default=False, verbose_name=b'\xd0\x9f\xd1\x80\xd0\xbe\xd0\xba\xd0\xb0\xd1\x82?')),
                ('description', models.TextField(null=True, blank=True)),
                ('catalog', models.ForeignKey(to='accounting.Catalog')),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('cred', models.ForeignKey(blank=True, to='accounting.ClientCredits', null=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['status', '-date_start', 'date_end'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ShopDailySales',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('price', models.FloatField()),
                ('description', models.TextField(null=True, blank=True)),
                ('cash', models.FloatField()),
                ('tcash', models.FloatField()),
                ('ocash', models.FloatField()),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['date', 'price'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ShopPrice',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('scount', models.IntegerField(default=1)),
                ('dcount', models.IntegerField(default=0)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('catalog', models.ForeignKey(to='accounting.Catalog')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['catalog', 'scount'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=100)),
                ('width', models.IntegerField()),
                ('hight', models.IntegerField()),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=255)),
                ('name_ukr', models.CharField(max_length=100, null=True, blank=True)),
                ('description_ukr', models.CharField(max_length=255, null=True, blank=True)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Wheel_Size',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('type', models.CharField(max_length=255)),
                ('description', models.TextField(null=True, blank=True)),
                ('iso', models.CharField(max_length=255)),
            ],
            options={
                'ordering': ['type'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='WorkDay',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateField()),
                ('status', models.IntegerField(default=0)),
                ('description', models.TextField(null=True, blank=True)),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['date'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='WorkGroup',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(null=True, blank=True)),
                ('tabindex', models.IntegerField()),
            ],
            options={
                'ordering': ['name', 'tabindex'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='WorkShop',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('price', models.FloatField()),
                ('pay', models.BooleanField(default=False, verbose_name=b'\xd0\x9e\xd0\xbf\xd0\xbb\xd0\xb0\xd1\x87\xd0\xb5\xd0\xbd\xd0\xbe?')),
                ('description', models.TextField(null=True, blank=True)),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['date', 'client'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='WorkStatus',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['name'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='WorkTicket',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateField()),
                ('end_date', models.DateField()),
                ('description', models.TextField(null=True, blank=True)),
                ('client', models.ForeignKey(to='accounting.Client')),
                ('phone_status', models.ForeignKey(blank=True, to='accounting.PhoneStatus', null=True)),
                ('status', models.ForeignKey(to='accounting.WorkStatus')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['date', 'status'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='WorkType',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=255)),
                ('price', models.FloatField()),
                ('description', models.TextField(null=True, blank=True)),
                ('work_group', models.ForeignKey(to='accounting.WorkGroup')),
            ],
            options={
                'ordering': ['work_group', 'name'],
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='workshop',
            name='work_type',
            field=models.ForeignKey(to='accounting.WorkType'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='dealerinvoice',
            name='manager',
            field=models.ForeignKey(blank=True, to='accounting.DealerManager', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='costs',
            name='cost_type',
            field=models.ForeignKey(to='accounting.CostType'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='clientorder',
            name='currency',
            field=models.ForeignKey(to='accounting.Currency'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='clientorder',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='clientinvoice',
            name='currency',
            field=models.ForeignKey(to='accounting.Currency'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='clientinvoice',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='client',
            name='country',
            field=models.ForeignKey(to='accounting.Country'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='check',
            name='catalog',
            field=models.ForeignKey(blank=True, to='accounting.ClientInvoice', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='check',
            name='checkPay',
            field=models.ForeignKey(blank=True, to='accounting.CheckPay', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='check',
            name='client',
            field=models.ForeignKey(to='accounting.Client'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='check',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='check',
            name='workshop',
            field=models.ForeignKey(blank=True, to='accounting.WorkShop', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='catalog',
            name='country',
            field=models.ForeignKey(to='accounting.Country', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='catalog',
            name='currency',
            field=models.ForeignKey(to='accounting.Currency'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='catalog',
            name='manufacturer',
            field=models.ForeignKey(to='accounting.Manufacturer'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='catalog',
            name='photo_url',
            field=models.ManyToManyField(to='accounting.Photo', blank=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='catalog',
            name='size',
            field=models.ForeignKey(blank=True, to='accounting.Size', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='catalog',
            name='type',
            field=models.ForeignKey(related_name=b'type', to='accounting.Type'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='catalog',
            name='user_update',
            field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_store',
            name='currency',
            field=models.ForeignKey(to='accounting.Currency'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_store',
            name='model',
            field=models.ForeignKey(blank=True, to='accounting.Bicycle', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_store',
            name='size',
            field=models.ForeignKey(blank=True, to='accounting.FrameSize', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_sale',
            name='client',
            field=models.ForeignKey(to='accounting.Client'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_sale',
            name='currency',
            field=models.ForeignKey(to='accounting.Currency'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_sale',
            name='debt',
            field=models.ForeignKey(blank=True, to='accounting.ClientDebts', null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_sale',
            name='model',
            field=models.ForeignKey(to='accounting.Bicycle_Store'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_sale',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_order',
            name='client',
            field=models.ForeignKey(to='accounting.Client'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_order',
            name='currency',
            field=models.ForeignKey(to='accounting.Currency'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_order',
            name='model',
            field=models.ForeignKey(to='accounting.Bicycle'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle_order',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle',
            name='brand',
            field=models.ForeignKey(to='accounting.Manufacturer'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle',
            name='currency',
            field=models.ForeignKey(to='accounting.Currency'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle',
            name='photo_url',
            field=models.ManyToManyField(to='accounting.Photo', blank=True),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle',
            name='type',
            field=models.ForeignKey(to='accounting.Bicycle_Type'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='bicycle',
            name='wheel_size',
            field=models.ForeignKey(blank=True, to='accounting.Wheel_Size', null=True),
            preserve_default=True,
        ),
    ]
