# Generated by Django 2.1.7 on 2019-05-20 19:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('chat_id', models.IntegerField(primary_key=True, serialize=False)),
                ('username', models.CharField(max_length=100, null=True)),
                ('first_name', models.CharField(max_length=100, null=True)),
                ('last_name', models.CharField(max_length=100, null=True)),
                ('phone_number', models.CharField(max_length=15, null=True)),
                ('chat_type', models.CharField(max_length=50, null=True)),
                ('state', models.CharField(default='start', max_length=50)),
                ('premium_type', models.CharField(max_length=50, null=True)),
                ('last_checked_bot', models.DateTimeField(default=django.utils.timezone.now)),
                ('user_rate', models.FloatField(default=0)),
                ('credit', models.IntegerField(default=0)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'db_table': 'users',
            },
        ),
        migrations.CreateModel(
            name='UserSearch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('query', models.TextField()),
                ('response', models.CharField(max_length=20)),
                ('search_result', models.TextField(null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='TelegramAdmin.User')),
            ],
            options={
                'db_table': 'users_searches',
            },
        ),
    ]
