# Generated by Django 3.0.8 on 2020-07-20 07:07

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Admin_Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('profile_photo', models.ImageField(blank=True, upload_to='profilepics/')),
                ('full_name', models.CharField(max_length=50)),
                ('bio', models.TextField()),
                ('this_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Neighbourhood',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('hood_name', models.CharField(max_length=50)),
                ('location', mapbox_location_field.models.LocationField(map_attrs={'center': [36.82, -1.29], 'marker_color': 'blue'})),
                ('address', mapbox_location_field.models.AddressAutoHiddenField(blank=True, map_id='map')),
                ('occupants_count', models.IntegerField(default=0)),
                ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hoodapp.Admin_Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Resident_Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('profile_photo', models.ImageField(blank=True, upload_to='profilepics/')),
                ('username', models.CharField(max_length=50)),
                ('full_name', models.CharField(max_length=50)),
                ('bio', models.TextField(blank=True)),
                ('home_location', mapbox_location_field.models.LocationField(blank=True, map_attrs={'center': [36.82, -1.29], 'marker_color': 'blue'})),
                ('hood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hoodapp.Neighbourhood')),
                ('this_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('text', models.TextField()),
                ('hood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hoodapp.Neighbourhood')),
                ('posted_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hoodapp.Resident_Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Facility',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('facility_name', models.CharField(max_length=100)),
                ('category', models.CharField(choices=[('police', 'Police Post'), ('hospital', 'Hospital/Healthcare center')], default='police', max_length=50)),
                ('contact', models.CharField(blank=True, max_length=100)),
                ('location', mapbox_location_field.models.LocationField(map_attrs={'center': [36.82, -1.29], 'marker_color': 'blue'})),
                ('hood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hoodapp.Neighbourhood')),
            ],
        ),
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('business_name', models.CharField(max_length=50)),
                ('short_description', models.CharField(max_length=150)),
                ('business_email', models.EmailField(max_length=254)),
                ('location', mapbox_location_field.models.LocationField(map_attrs={'center': [36.82, -1.29], 'marker_color': 'blue'})),
                ('hood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hoodapp.Neighbourhood')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
