# Generated by Django 4.0.1 on 2023-04-09 12:11

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import markdownx.models
import utils


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('members', '0012_member_image_group_description'),
    ]

    operations = [
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='Title')),
                ('urlname', models.CharField(max_length=25, verbose_name='URL')),
                ('website_text', markdownx.models.MarkdownxField(blank=True, default='', verbose_name='website text')),
            ],
            options={
                'verbose_name': 'Section',
                'verbose_name_plural': 'Sections',
                'unique_together': {('urlname',)},
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50, verbose_name='Title')),
                ('urlname', models.CharField(default='', max_length=50, verbose_name='URL')),
                ('date', models.DateField(blank=True, default=django.utils.timezone.localdate, null=True, verbose_name='Date')),
                ('website_text', markdownx.models.MarkdownxField(blank=True, default='', verbose_name='website text')),
                ('detailed', models.BooleanField(default=False, verbose_name='detailed')),
                ('groups', models.ManyToManyField(blank=True, to='members.Group', verbose_name='Groups')),
                ('section', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='startpage.section', verbose_name='section')),
            ],
            options={
                'verbose_name': 'Post',
                'verbose_name_plural': 'Posts',
                'unique_together': {('section', 'urlname')},
            },
        ),
        migrations.CreateModel(
            name='MemberOnPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(blank=True, default='', verbose_name='Description')),
                ('tag', models.CharField(blank=True, default='', max_length=20, verbose_name='Tag')),
                ('members', models.ManyToManyField(blank=True, to='members.Member', verbose_name='Member')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='people', to='startpage.post', verbose_name='Member')),
            ],
            options={
                'verbose_name': 'Person',
                'verbose_name_plural': 'Persons',
            },
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('f', utils.RestrictedFileField(blank=True, upload_to='images', verbose_name='file')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='startpage.post')),
            ],
            options={
                'verbose_name': 'image',
                'verbose_name_plural': 'images',
            },
        ),
    ]
