# Generated by Django 3.2.4 on 2021-08-26 12:08

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


class Migration(migrations.Migration):

    dependencies = [
        ("applications", "0005_change_encryption_library"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="historicalsummervoucher",
            name="employment_contract",
        ),
        migrations.RemoveField(
            model_name="historicalsummervoucher",
            name="payslip",
        ),
        migrations.RemoveField(
            model_name="summervoucher",
            name="employment_contract",
        ),
        migrations.RemoveField(
            model_name="summervoucher",
            name="payslip",
        ),
        migrations.CreateModel(
            name="Attachment",
            fields=[
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="time created"
                    ),
                ),
                (
                    "modified_at",
                    models.DateTimeField(auto_now=True, verbose_name="time modified"),
                ),
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "attachment_type",
                    models.CharField(
                        choices=[
                            ("employment_contract", "employment contract"),
                            ("payslip", "payslip"),
                        ],
                        max_length=64,
                        verbose_name="attachment type in business rules",
                    ),
                ),
                (
                    "content_type",
                    models.CharField(
                        choices=[
                            ("application/pdf", "pdf"),
                            ("image/png", "png"),
                            ("image/jpeg", "jpeg"),
                        ],
                        max_length=100,
                        verbose_name="technical content type of the attachment",
                    ),
                ),
                (
                    "attachment_file",
                    models.FileField(
                        upload_to="", verbose_name="application attachment content"
                    ),
                ),
                (
                    "summer_voucher",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="attachments",
                        to="applications.summervoucher",
                        verbose_name="summer voucher",
                    ),
                ),
            ],
            options={
                "verbose_name": "attachment",
                "verbose_name_plural": "attachments",
                "ordering": ["attachment_type", "created_at"],
            },
        ),
    ]

# Generated by Django 3.2.4 on 2021-08-26 12:08

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


class Migration(migrations.Migration):

    dependencies = [
        ("applications", "0005_change_encryption_library"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="historicalsummervoucher",
            name="employment_contract",
        ),
        migrations.RemoveField(
            model_name="historicalsummervoucher",
            name="payslip",
        ),
        migrations.RemoveField(
            model_name="summervoucher",
            name="employment_contract",
        ),
        migrations.RemoveField(
            model_name="summervoucher",
            name="payslip",
        ),
        migrations.CreateModel(
            name="Attachment",
            fields=[
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="time created"
                    ),
                ),
                (
                    "modified_at",
                    models.DateTimeField(auto_now=True, verbose_name="time modified"),
                ),
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "attachment_type",
                    models.CharField(
                        choices=[
                            ("employment_contract", "employment contract"),
                            ("payslip", "payslip"),
                        ],
                        max_length=64,
                        verbose_name="attachment type in business rules",
                    ),
                ),
                (
                    "content_type",
                    models.CharField(
                        choices=[
                            ("application/pdf", "pdf"),
                            ("image/png", "png"),
                            ("image/jpeg", "jpeg"),
                        ],
                        max_length=100,
                        verbose_name="technical content type of the attachment",
                    ),
                ),
                (
                    "attachment_file",
                    models.FileField(
                        upload_to="", verbose_name="application attachment content"
                    ),
                ),
                (
                    "summer_voucher",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="attachments",
                        to="applications.summervoucher",
                        verbose_name="summer voucher",
                    ),
                ),
            ],
            options={
                "verbose_name": "attachment",
                "verbose_name_plural": "attachments",
                "ordering": ["attachment_type", "created_at"],
            },
        ),
    ]

# Generated by Django 3.2.4 on 2021-08-26 12:08