# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-06-19 08:26
from __future__ import unicode_literals

from django.db import migrations, models
import django.utils.timezone
import model_utils.fields
import waldur_core.core.fields
import waldur_core.core.validators
from waldur_core.media.models import get_upload_path


class Migration(migrations.Migration):

    dependencies = [
        ('marketplace', '0006_allow_svg_category_icon'),
    ]

    operations = [
        migrations.CreateModel(
            name='Screenshots',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('description', models.CharField(blank=True, max_length=500, verbose_name='description')),
                ('uuid', waldur_core.core.fields.UUIDField()),
                ('name', models.CharField(max_length=150, validators=[waldur_core.core.validators.validate_name], verbose_name='name')),
                ('image', models.ImageField(upload_to=get_upload_path)),
                ('thumbnail', models.ImageField(editable=False, null=True, upload_to=get_upload_path))
            ],
            options={
                'verbose_name': 'Screenshot',
            },
        ),
        migrations.AddField(
            model_name='screenshots',
            name='offering',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='screenshots', to='marketplace.Offering'),
        ),
    ]
