# Generated by Django 2.2.6 on 2019-10-22 15:16

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=55)),
                ('content', models.TextField()),
                ('image', models.ImageField(blank=True, default='user_image/default.jpg', null=True, upload_to='user_image/')),
                ('datePublished', models.DateTimeField(default=django.utils.timezone.now)),
                ('commentsTotal', models.IntegerField(default=0)),
                ('likes', models.ManyToManyField(blank=True, related_name='post_likes', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=55)),
                ('details', models.TextField()),
                ('dateTime', models.DateTimeField()),
                ('image', models.ImageField(blank=True, default='user_image/beach.jpg', null=True, upload_to='user_image/')),
                ('addressID', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.Address')),
                ('userId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('commentTime', models.DateTimeField(default=django.utils.timezone.now)),
                ('comment', models.TextField()),
                ('postId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Post')),
                ('userId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
