# Generated by Django 3.2.1 on 2021-06-01 14:38

import causes.models
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='Cause',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('owner_email', models.EmailField(blank=True, max_length=254, null=True)),
                ('owner_description', models.TextField()),
                ('cause_description', models.TextField()),
                ('image', models.ImageField(default='cause_pics/hands-love.png', upload_to='cause_pics')),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('end_date', models.DateTimeField(default=causes.models.get_cause_end_date)),
                ('approved', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ('title',),
            },
        ),
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('cause', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='causes.cause')),
            ],
        ),
    ]
