# Generated by Django 2.2 on 2019-05-02 10:19

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Activity type')),
                ('slug', models.SlugField(blank=True)),
                ('description', models.TextField(verbose_name='Activity description')),
                ('picture', models.ImageField(blank=True, null=True, upload_to='activities/', validators=[openrepairplatform.utils.validate_image], verbose_name='Image')),
            ],
        ),
        migrations.CreateModel(
            name='Condition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Condition Type')),
                ('description', models.TextField(verbose_name='Condition description')),
                ('price', models.FloatField(default=5, verbose_name='Price')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('published', models.BooleanField(default=False, verbose_name='Published')),
                ('publish_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Publication date and time')),
                ('slug', models.SlugField(blank=True)),
                ('starts_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Start date and time')),
                ('ends_at', models.DateTimeField(verbose_name='End date and time')),
                ('available_seats', models.IntegerField(default=0, verbose_name='Available seats')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('activity', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='event.Activity')),
                ('conditions', models.ManyToManyField(blank=True, related_name='events', to='event.Condition', verbose_name='Conditions')),
            ],
        ),
    ]
