# Generated by Django 2.2.5 on 2019-09-22 05:52

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AdModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=50)),
                ('category', models.CharField(choices=[('Marketing', 'Marketing'), ('Student Consultancy', 'Student Consultancy'), ('Web Development', 'Web Development'), ('Teach', 'Teach'), ('Designing', 'Designing'), ('Other', 'Other')], default='Other', max_length=50)),
                ('description', tinymce.models.HTMLField(verbose_name='Content')),
                ('image', models.ImageField(upload_to='img/ad_image')),
                ('featured', models.BooleanField(default=0)),
                ('comments', models.IntegerField(default=0)),
                ('total_rating', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='CityModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120)),
                ('category', models.CharField(choices=[('*', 'All'), ('ml', 'Machine Learning'), ('app', 'Web App'), ('data', 'Data Analysis'), ('other', 'Other')], default='*', max_length=20)),
                ('description', models.TextField(max_length=250, null=True)),
                ('content', tinymce.models.HTMLField(verbose_name='Content')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('image', models.CharField(default='default.jpg', max_length=50)),
                ('link', models.URLField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='CommentModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField()),
                ('rating', models.CharField(choices=[('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], default='3', max_length=1)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('ad', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboard.AdModel')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='admodel',
            name='city',
            field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='dashboard.CityModel'),
        ),
        migrations.AddField(
            model_name='admodel',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
