# Generated by Django 4.2.6 on 2023-10-28 11:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='SDECategory',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField()),
                ('published', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='SDEGroup',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField()),
                ('published', models.BooleanField()),
                ('useBasePrice', models.BooleanField()),
                ('fittableNonSingleton', models.BooleanField()),
                ('anchored', models.BooleanField()),
                ('anchorable', models.BooleanField()),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='groups', to='sde.sdecategory')),
            ],
        ),
        migrations.CreateModel(
            name='SDEIcon',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('iconFile', models.CharField()),
                ('description', models.CharField()),
            ],
        ),
        migrations.CreateModel(
            name='SDEMarektGroup',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField()),
                ('description', models.CharField(default='')),
                ('hasTypes', models.BooleanField()),
                ('icon', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='sde.sdeicon')),
                ('parent_marketgroup', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='child_marketgroups', to='sde.sdemarektgroup')),
            ],
        ),
        migrations.CreateModel(
            name='SDEMetaGroup',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField()),
                ('iconSuffix', models.CharField()),
                ('icon', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='metagroups', to='sde.sdeicon')),
            ],
        ),
        migrations.CreateModel(
            name='SDEType',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField()),
                ('description', models.CharField()),
                ('published', models.BooleanField()),
                ('basePrice', models.FloatField()),
                ('volume', models.FloatField()),
                ('portionSize', models.IntegerField()),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='types', to='sde.sdegroup')),
                ('icon', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='types', to='sde.sdeicon')),
                ('marketgroup', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='types', to='sde.sdemarektgroup')),
            ],
        ),
        migrations.CreateModel(
            name='SDETypeMaterial',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('material_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='typematerials_of', to='sde.sdetype')),
                ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='typematerials', to='sde.sdetype')),
            ],
        ),
        migrations.AddField(
            model_name='sdetype',
            name='materials',
            field=models.ManyToManyField(related_name='material_of', through='sde.SDETypeMaterial', to='sde.sdetype'),
        ),
        migrations.AddField(
            model_name='sdetype',
            name='metagroup',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='types', to='sde.sdemetagroup'),
        ),
        migrations.AddField(
            model_name='sdegroup',
            name='icon',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='groups', to='sde.sdeicon'),
        ),
        migrations.AddField(
            model_name='sdecategory',
            name='icon',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='categories', to='sde.sdeicon'),
        ),
    ]
