# Generated by Django 3.2.8 on 2021-10-26 17:37

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128, verbose_name='Title')),
                ('status', models.IntegerField(choices=[(1, 'Open'), (2, 'Closed'), (3, 'Freezed')], default=1)),
                ('text', models.TextField(max_length=8192, verbose_name='Question')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Creation time')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tickets', to=settings.AUTH_USER_MODEL, verbose_name='Author')),
            ],
            options={
                'verbose_name': 'Ticket',
                'verbose_name_plural': 'Tickets',
                'permissions': [('can_view_all_tickets', 'Can view all tickets'), ('can_change_status', 'Can change status')],
            },
        ),
    ]
