# Generated by Django 2.2.5 on 2020-10-05 20:13

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Agencies',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=50)),
                ('address', models.CharField(max_length=100)),
                ('url', models.URLField()),
                ('phone', phone_field.models.PhoneField(max_length=31)),
                ('username', models.CharField(blank=True, max_length=100, null=True, unique=True)),
                ('picture', models.ImageField(blank=True, default='defaultProfilePic.jpg', null=True, upload_to='media/')),
            ],
        ),
        migrations.CreateModel(
            name='Cause',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('location', models.CharField(max_length=100)),
                ('username', models.CharField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='News_Articles',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.URLField(blank=True, max_length=100, null=True)),
                ('url', models.URLField(max_length=100)),
                ('title', models.CharField(max_length=100, null=True)),
                ('description', models.CharField(max_length=1000, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Request_In_Progress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item', models.CharField(max_length=250, null=True)),
                ('amount_total', models.DecimalField(decimal_places=2, max_digits=10)),
                ('amount_fulfilled', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('is_complete', models.BooleanField(default=False)),
                ('date_requested', models.DateField(auto_now_add=True)),
                ('agency', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='myapp.Agencies')),
            ],
        ),
        migrations.CreateModel(
            name='Request_Fulfilled',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fulfilled_amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('promised_amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('promised_arrival', models.DateField()),
                ('request_in_progress', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='myapp.Request_In_Progress')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('picture', models.ImageField(blank=True, default='defaultProfilePic.jpg', null=True, upload_to='media/')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='agencies',
            name='admin_users',
            field=models.ManyToManyField(blank=True, to='myapp.Profile'),
        ),
        migrations.AddField(
            model_name='agencies',
            name='causes',
            field=models.ManyToManyField(blank=True, to='myapp.Cause'),
        ),
    ]
