# Generated by Django 2.2.4 on 2019-10-28 16:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('crm', '0025_remove_formentry_record_created_db'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Name der Kategorie', max_length=100, verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='DbTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Name der Vorlage', max_length=100, verbose_name='Name')),
                ('content', models.TextField(verbose_name='Inhalt der Vorlage')),
                ('category', models.ForeignKey(help_text='z.B. Einladung, Eingangsvermerk, Teilnahmebestätigung', on_delete=django.db.models.deletion.CASCADE, to='crm.Category')),
                ('content_model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
            ],
        ),
        migrations.CreateModel(
            name='MessagePart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Name des Nachrichtenteils, i.e. Betreffzeile, Textkörper', max_length=100, verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='TemplateConnection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('content_model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='connected_templates', to='contenttypes.ContentType')),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crm.DbTemplate')),
            ],
        ),
        migrations.CreateModel(
            name='Inheritance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('child_model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inheritance_child', to='contenttypes.ContentType', verbose_name='Untergeordneter Inhaltstyp')),
                ('parent_model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inheritance_parent', to='contenttypes.ContentType', verbose_name='Übergeordneter Inhaltstyp')),
            ],
        ),
        migrations.AddField(
            model_name='dbtemplate',
            name='message_part',
            field=models.ForeignKey(help_text='Welcher Teil der Nacricht?', on_delete=django.db.models.deletion.CASCADE, to='crm.MessagePart'),
        ),
    ]
