# Generated by Django 3.0.4 on 2020-04-12 02:43

import ckeditor.fields
from django.db import migrations, models
import django.db.models.deletion
import portfolio.app.projects.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('date_modified', models.DateTimeField(auto_now=True, db_index=True)),
                ('name', models.CharField(max_length=64, unique=True)),
                ('description', ckeditor.fields.RichTextField()),
                ('showcase_description', ckeditor.fields.RichTextField(blank=True, help_text='Long description of the project to be used when the project is showcased. Only allowed, but also required, if showcase is checked.', null=True)),
                ('object_id', models.PositiveIntegerField(blank=True, null=True)),
                ('showcase', models.BooleanField(default=False, help_text='Determines whether or not the project will be showcased on the projects page.  If showcasing a project, the project must include at least 1 image file.')),
                ('content_type', models.ForeignKey(blank=True, limit_choices_to={'model__in': ('education.Education', 'experience.Experience')}, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProjectFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('date_modified', models.DateTimeField(auto_now=True, db_index=True)),
                ('file', models.FileField(null=True, upload_to=portfolio.app.projects.models.upload_to)),
                ('name', models.CharField(help_text='Human readable name for the file that will be displayed to users in links to download or access the file.', max_length=64)),
                ('description', ckeditor.fields.RichTextField(blank=True, null=True)),
                ('caption', ckeditor.fields.RichTextField(blank=True, help_text='Caption for image files.  Only allowed/required when the file is an image file.', null=True)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='projects.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
