# Generated by Django 3.2.4 on 2021-06-22 01:43

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0029_notification_created_at'),
    ]

    operations = [
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.BigAutoField(auto_created=True,
                 primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('content', models.CharField(max_length=1000)),
                ('plan_image', models.ImageField(blank=True,
                 null=True, upload_to=api.models.upload_plan_path)),
                ('is_published', models.BooleanField(default=False)),
                ('published_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('price', models.PositiveSmallIntegerField(default=0)),
                ('created_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                 related_name='posted_user', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.DeleteModel(
            name='Post',
        ),
        migrations.AddField(
            model_name='talkroom',
            name='selected_plan',
            field=models.ForeignKey(
                blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='selected_plan', to='api.plan'),
        ),
    ]
