# Generated by Django 3.1.7 on 2021-03-23 10:11

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='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('active', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Support',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_raised', models.DateField(auto_now_add=True)),
                ('issue', models.CharField(max_length=300)),
                ('in_progress', models.BooleanField(default=False)),
                ('resolved', models.BooleanField(default=False)),
                ('resolution', models.CharField(max_length=300)),
                ('date_closed', models.DateField(blank=True, null=True)),
                ('log_by', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='raise_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ShopGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('purpose', models.CharField(max_length=200)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('disabled', models.BooleanField(default=False)),
                ('leaders', models.ManyToManyField(blank=True, related_name='leader_of', to=settings.AUTH_USER_MODEL)),
                ('manager', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='manage_by', to=settings.AUTH_USER_MODEL)),
                ('members', models.ManyToManyField(blank=True, related_name='member_of', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ReferenceItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
                ('recommendation', models.CharField(max_length=100)),
                ('date_added', models.DateField(auto_now_add=True)),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='the_list.category')),
                ('created', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='created_by', to=settings.AUTH_USER_MODEL)),
                ('in_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup')),
            ],
            options={
                'ordering': ['description'],
            },
        ),
        migrations.CreateModel(
            name='Merchant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('date_added', models.DateField(auto_now_add=True)),
                ('for_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup')),
            ],
            options={
                'ordering': ['name'],
                'unique_together': {('name', 'for_group')},
            },
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
                ('quantity', models.CharField(blank=True, default='1', max_length=30, null=True)),
                ('date_requested', models.DateField(auto_now_add=True)),
                ('date_purchased', models.DateField(blank=True, null=True)),
                ('cancelled', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cancel_by', to=settings.AUTH_USER_MODEL)),
                ('in_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup')),
                ('purchased', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='buy_by', to=settings.AUTH_USER_MODEL)),
                ('requested', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='req_by', to=settings.AUTH_USER_MODEL)),
                ('to_get_from', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='the_list.merchant')),
            ],
            options={
                'ordering': ['description'],
            },
        ),
        migrations.AddField(
            model_name='category',
            name='in_group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup'),
        ),
    ]

# Generated by Django 3.1.7 on 2021-03-23 10:11

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='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('active', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Support',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_raised', models.DateField(auto_now_add=True)),
                ('issue', models.CharField(max_length=300)),
                ('in_progress', models.BooleanField(default=False)),
                ('resolved', models.BooleanField(default=False)),
                ('resolution', models.CharField(max_length=300)),
                ('date_closed', models.DateField(blank=True, null=True)),
                ('log_by', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='raise_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ShopGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('purpose', models.CharField(max_length=200)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('disabled', models.BooleanField(default=False)),
                ('leaders', models.ManyToManyField(blank=True, related_name='leader_of', to=settings.AUTH_USER_MODEL)),
                ('manager', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='manage_by', to=settings.AUTH_USER_MODEL)),
                ('members', models.ManyToManyField(blank=True, related_name='member_of', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ReferenceItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
                ('recommendation', models.CharField(max_length=100)),
                ('date_added', models.DateField(auto_now_add=True)),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='the_list.category')),
                ('created', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='created_by', to=settings.AUTH_USER_MODEL)),
                ('in_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup')),
            ],
            options={
                'ordering': ['description'],
            },
        ),
        migrations.CreateModel(
            name='Merchant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('date_added', models.DateField(auto_now_add=True)),
                ('for_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup')),
            ],
            options={
                'ordering': ['name'],
                'unique_together': {('name', 'for_group')},
            },
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
                ('quantity', models.CharField(blank=True, default='1', max_length=30, null=True)),
                ('date_requested', models.DateField(auto_now_add=True)),
                ('date_purchased', models.DateField(blank=True, null=True)),
                ('cancelled', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cancel_by', to=settings.AUTH_USER_MODEL)),
                ('in_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup')),
                ('purchased', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='buy_by', to=settings.AUTH_USER_MODEL)),
                ('requested', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='req_by', to=settings.AUTH_USER_MODEL)),
                ('to_get_from', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='the_list.merchant')),
            ],
            options={
                'ordering': ['description'],
            },
        ),
        migrations.AddField(
            model_name='category',
            name='in_group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='the_list.shopgroup'),
        ),
    ]

# Generated by Django 3.1.7 on 2021-03-23 10:11