# Generated by Django 3.2.7 on 2022-03-24 16:37

import private_storage.fields
import private_storage.storage.files
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("auth", "0012_alter_user_first_name_max_length"),
    ]

    operations = [
        migrations.CreateModel(
            name="Material",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Display text for the material",
                        max_length=200,
                    ),
                ),
                (
                    "date_created",
                    models.DateTimeField(
                        auto_now_add=True,
                        help_text="Date when the material has been uploaded.",
                    ),
                ),
                (
                    "last_modification_date",
                    models.DateTimeField(
                        auto_now=True,
                        help_text="Date when the material has last been modified.",
                    ),
                ),
                (
                    "upload_material",
                    private_storage.fields.PrivateFileField(
                        blank=True,
                        help_text="Material to upload, max. 25MB. Uploaded Material is only accessible to community members.",
                        max_length=500,
                        null=True,
                        storage=private_storage.storage.files.PrivateFileSystemStorage(),
                        upload_to="media/",
                    ),
                ),
                (
                    "external_url",
                    models.URLField(
                        blank=True,
                        help_text="External URL for this material.",
                        null=True,
                    ),
                ),
            ],
        ),
    ]
