# Generated by Django 2.2.3 on 2019-11-25 18:40

import datetime
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='AllowanceDiscount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=255, verbose_name='name')),
                ('coefficient', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='coefficient')),
                ('label', models.CharField(max_length=255, verbose_name='group')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Atelier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=150, verbose_name='name')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('first_name', models.CharField(max_length=30, verbose_name='first Name')),
                ('last_name', models.CharField(max_length=30, verbose_name='second Name')),
                ('tel_number', models.CharField(blank=True, max_length=30, verbose_name='tel. number')),
                ('place', models.CharField(max_length=30, verbose_name='place')),
                ('atelier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atelier.Atelier', verbose_name='atelier')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['first_name'],
            },
        ),
        migrations.CreateModel(
            name='ComplicationElement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=264, verbose_name='name')),
                ('base_price', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='base price')),
                ('complexity', models.DecimalField(decimal_places=2, default=1, max_digits=3, verbose_name='complexity')),
                ('group', models.CharField(default='4', max_length=255, verbose_name='group name')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['group'],
            },
        ),
        migrations.CreateModel(
            name='Fabric',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=264, verbose_name='name')),
                ('group', models.CharField(choices=[('GR0', 'Group 0'), ('GR1', 'Group I'), ('GR2', 'Group II'), ('GR3', 'Group III'), ('GR4', 'Group IV')], default='GR2', max_length=3, verbose_name='group')),
                ('complexity_factor', models.DecimalField(decimal_places=2, default=1, max_digits=5, verbose_name='complexity factor')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['group'],
            },
        ),
        migrations.CreateModel(
            name='MinimalStyle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('name', models.TextField(max_length=264, verbose_name='name')),
                ('group', models.CharField(max_length=264, verbose_name='product group')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['group'],
            },
        ),
        migrations.CreateModel(
            name='Tailor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('atelier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='atelier.Atelier', verbose_name='atelier')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='name')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=264, verbose_name='name')),
                ('base_price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='base price')),
                ('atelier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atelier.Atelier', verbose_name='Atelier')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('minimal_style', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atelier.MinimalStyle', verbose_name='minimal style')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(auto_now_add=True)),
                ('last_updated_datetime', models.DateTimeField(auto_now=True)),
                ('processing_category', models.CharField(choices=[('1', 'Processing category 1'), ('2', 'Processing category 2')], default='2', max_length=1, verbose_name='processing category')),
                ('order_date', models.DateField(default=datetime.date.today, verbose_name='order date')),
                ('deadline', models.DateField(blank=True, default=datetime.date(2019, 12, 9), null=True, verbose_name='deadline')),
                ('allowance_discount', models.ManyToManyField(blank=True, to='atelier.AllowanceDiscount', verbose_name='allowance/discount')),
                ('atelier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atelier.Atelier', verbose_name='atelier')),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atelier.Client', verbose_name='client')),
                ('complication_elements', models.ManyToManyField(blank=True, to='atelier.ComplicationElement', verbose_name='complication elements')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('fabric', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atelier.Fabric', verbose_name='fabric')),
                ('last_updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atelier.Product', verbose_name='product')),
                ('tailor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='tailor')),
            ],
            options={
                'ordering': ['order_date'],
            },
        ),
    ]
