# Generated by Django 3.0.8 on 2020-07-09 09:47

from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('bot', '0002_auto_20200709_0829'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='loginhash',
            options={'ordering': ['telegram_user']},
        ),
        migrations.AddField(
            model_name='telegramgroup',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='owns', to='bot.TelegramUser'),
        ),
        migrations.AlterField(
            model_name='telegramuser',
            name='telegram_last_name',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
        migrations.AlterField(
            model_name='telegramuser',
            name='telegram_username',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
        migrations.CreateModel(
            name='GroupPreferences',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('restrict_to_owner', models.BooleanField(blank=True, default=False)),
                ('use_combot_anti_spam', models.BooleanField(blank=True, default=False)),
                ('join_message', models.TextField(blank=True, default='')),
                ('leave_message', models.TextField(blank=True, default='')),
                ('use_captcha', models.BooleanField(blank=True, default=False)),
                ('captcha_chars', models.TextField(blank=True, default='0123456789')),
                ('captcha_first_message', models.TextField(blank=True, default='')),
                ('captcha_retry_message', models.TextField(blank=True, default='')),
                ('captcha_failed_message', models.TextField(blank=True, default='')),
                ('captcha_failed_ban', models.BooleanField(blank=True, default=False)),
                ('captcha_leave_mess', models.BooleanField(blank=True, default=False)),
                ('captcha_generate', models.BooleanField(blank=True, default=False)),
                ('group', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='preferences', to='bot.TelegramGroup')),
            ],
            options={
                'ordering': ['group'],
            },
        ),
        migrations.CreateModel(
            name='GroupCannedMessage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('listen', models.CharField(max_length=255)),
                ('reply_with', models.TextField(max_length=2000)),
                ('group_preferences', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='canned_messages', to='bot.GroupPreferences')),
            ],
            options={
                'ordering': ['group_preferences', 'listen', 'reply_with'],
            },
        ),
    ]
