# Generated by Django 3.0.6 on 2020-10-18 03:05

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default=None, max_length=24)),
                ('ip_address', models.CharField(default=None, max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('orders', models.TextField(default={})),
                ('paid', models.BooleanField(default=False)),
                ('mode_of_payment', models.PositiveSmallIntegerField(choices=[('OFFLINE', 0), ('ONLINE', 1)], default=0)),
                ('date_of_order', models.DateTimeField(auto_now=True)),
                ('date_of_payment', models.DateTimeField(default=None)),
                ('chat', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='Anonymous.Chat')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default=None, max_length=20)),
                ('category', models.PositiveSmallIntegerField(choices=[('HEALTH', 0), ('SEX', 1), ('BODY_BUILDING', 2), ('TECH', 3)], default=None)),
                ('image', models.ImageField(default=None, upload_to='Products/Images')),
                ('description', models.TextField(default=None)),
                ('cost_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=5)),
                ('selling_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=5)),
            ],
        ),
        migrations.CreateModel(
            name='Testimony',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(default=None)),
                ('date_added', models.DateTimeField(auto_now=True)),
                ('order', models.OneToOneField(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='Anonymous.Order')),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('consultant', models.NullBooleanField(default=None)),
                ('text', models.TextField(default=None)),
                ('image', models.ImageField(default=None, upload_to='None/message/images')),
                ('time', models.DateTimeField(auto_now=True)),
                ('chat', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='Anonymous.Chat')),
            ],
        ),
        migrations.CreateModel(
            name='Consultant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(default='Consult-3r6I8IK-0HRZAgVd', max_length=16)),
                ('date', models.DateField(default=None)),
                ('limit', models.PositiveIntegerField(default=0)),
                ('visitors', models.TextField(default='[]')),
                ('dismissed', models.TextField(default='[]')),
                ('blocked', models.TextField(default='[]')),
                ('user', models.OneToOneField(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='chat',
            name='consultant',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='Anonymous.Consultant'),
        ),
    ]
