# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-12 18:11
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='FundRaiser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=150)),
                ('causes', models.CharField(blank=True, choices=[(b'animal_welfare', b'Animal Welfare'), (b'education', b'Education'), (b'medical', b'Medical'), (b'farmers_welcome', b'Farmers Welfare'), (b'water_conservation', b'Water Conservation'), (b'women_empowerment', b'Women Empowerment'), (b'organic_farming', b'Organic Agriculture/Farming')], max_length=20)),
                ('image', models.ImageField(null=True, upload_to='media/uploads/fundraisers/titles/')),
                ('video_link', models.URLField(max_length=250, null=True)),
                ('short_description', models.CharField(max_length=250)),
                ('full_description', models.TextField(max_length=5000)),
                ('campaign_type', models.CharField(choices=[(b'non_ngo', b'Individual/Non-NGO'), (b'ngo', b'NGO')], default='non_ngo', max_length=10)),
                ('beneficiary_type', models.CharField(choices=[(b'personal', b'Personal'), (b'ngo', b'NGO/Non-Profit Company')], default='personal', max_length=10)),
                ('city', models.CharField(max_length=100)),
                ('goal', models.PositiveIntegerField(default=1000)),
                ('end_date', models.DateTimeField()),
                ('progress', models.DateTimeField()),
                ('short_link', models.URLField(max_length=100, null=True)),
                ('status', models.CharField(choices=[(b'draft', b'Draft'), (b'approved', b'Approved'), (b'published', b'Published'), (b'closed', b'Closed'), (b'blocked', b'Blocked')], default='draft', max_length=20)),
                ('campainer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='campaign_admin', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FundRaiserUpdate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=150)),
                ('text', models.TextField(max_length=5000)),
                ('fundraiser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='updates', to='fundraisers.FundRaiser')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='champaign_updates', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FundRaiserUpdateComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now=True)),
                ('text', models.TextField(max_length=500)),
                ('fundraiser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='fundraisers.FundRaiserUpdate')),
                ('parent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='fundraisers.FundRaiserUpdateComment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='campaign_comments', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FundRaiserUpdateImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(null=True, upload_to='media/uploads/fundraisers/images/')),
                ('image_link', models.URLField(max_length=250, null=True)),
                ('fundraiser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fundraiser_update_images', to='fundraisers.FundRaiserUpdate')),
            ],
        ),
        migrations.CreateModel(
            name='FundRaiserUpdateVideo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('video_link', models.URLField(max_length=250)),
                ('fundraiser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fundraiser_update_videos', to='fundraisers.FundRaiserUpdate')),
            ],
        ),
    ]
