# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-05-08 22:10
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='Article',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='Номер')),
                ('name', models.CharField(blank=True, max_length=100, verbose_name='Име')),
                ('description', models.TextField(blank=True, max_length=2000, verbose_name='Описание')),
                ('delivery_price', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='Доставна цена')),
                ('sale_price', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='Продажна цена')),
                ('last_price_dl', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='Посл.Цена на доставка')),
                ('last_price_sl', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='Посл.Цена на продажба')),
                ('last_update_date', models.DateTimeField(blank=True, null=True, verbose_name='Дата промяна')),
                ('measure', models.CharField(blank=True, max_length=50, null=True, verbose_name='Мярка')),
                ('active', models.BooleanField(default=True, verbose_name='Активен')),
            ],
            options={
                'managed': True,
                'verbose_name': 'Артикул',
                'verbose_name_plural': 'Артикули',
                'db_table': 'article',
            },
        ),
        migrations.CreateModel(
            name='ArticleGroup',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='Номер')),
                ('name', models.CharField(max_length=80, verbose_name='Име')),
                ('delivery_type', models.BooleanField(default=False, verbose_name='За доставки')),
                ('order_type', models.BooleanField(default=False, verbose_name='За продажби')),
                ('create_date', models.DateTimeField(blank=True, null=True, verbose_name='Дата на създаване')),
            ],
            options={
                'managed': True,
                'verbose_name': 'Артикулна група',
                'verbose_name_plural': 'Артикулни групи',
                'db_table': 'article_group',
            },
        ),
        migrations.CreateModel(
            name='Cashdesk_groups_expense',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='Номер')),
                ('name', models.CharField(blank=True, max_length=80, verbose_name='Група')),
                ('sub_name', models.CharField(blank=True, max_length=120, verbose_name='Подгрупа')),
            ],
            options={
                'managed': True,
                'verbose_name': 'Група каса разход',
                'verbose_name_plural': 'Групи каса разход',
                'db_table': 'cashdesk_groups_expense',
            },
        ),
        migrations.CreateModel(
            name='Cashdesk_groups_income',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='Номер')),
                ('name', models.CharField(blank=True, max_length=80, verbose_name='Група')),
                ('sub_name', models.CharField(blank=True, max_length=120, verbose_name='Подгрупа')),
            ],
            options={
                'managed': True,
                'verbose_name': 'Група каса приход',
                'verbose_name_plural': 'Групи каса приход',
                'db_table': 'cashdesk_groups_income',
            },
        ),
        migrations.CreateModel(
            name='Club',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='Номер')),
                ('name', models.CharField(blank=True, max_length=240, verbose_name='Име')),
                ('hall_price', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='Цена на зала')),
                ('address', models.CharField(blank=True, max_length=240, verbose_name='Адрес')),
            ],
            options={
                'managed': True,
                'verbose_name': 'Клуб',
                'verbose_name_plural': 'Клубове',
                'db_table': 'club',
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('club_fk', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='nomenclature.Club', verbose_name='Клуб')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'managed': True,
                'verbose_name': 'Служител',
                'verbose_name_plural': 'Служители',
                'db_table': 'Employee',
            },
        ),
        migrations.CreateModel(
            name='Saloon',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='Номер')),
                ('name', models.CharField(blank=True, max_length=200, verbose_name='Име')),
                ('club_fk', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='nomenclature.Club', verbose_name='Клуб')),
            ],
            options={
                'verbose_name': 'Салон',
                'verbose_name_plural': 'Салони',
                'db_table': 'saloon',
            },
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='Номер')),
                ('name', models.CharField(blank=True, max_length=60, verbose_name='Име')),
                ('description', models.CharField(blank=True, max_length=500, verbose_name='Описание')),
            ],
            options={
                'managed': True,
                'verbose_name': 'Доставчик',
                'verbose_name_plural': 'Доставчици',
                'db_table': 'supplier',
            },
        ),
        migrations.AddField(
            model_name='article',
            name='group_fk',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='nomenclature.ArticleGroup', verbose_name='Артикулна група'),
        ),
        migrations.AddField(
            model_name='article',
            name='supplier_fk',
            field=models.ManyToManyField(to='nomenclature.Supplier', verbose_name='Доставчик'),
        ),
    ]
