Quiz
75 строк · 3.5 Кб
1# Generated by Django 4.0.4 on 2023-03-12 21:38
2
3from django.db import migrations, models
4import django.db.models.deletion
5
6
7class Migration(migrations.Migration):
8
9initial = True
10
11dependencies = [
12]
13
14operations = [
15migrations.CreateModel(
16name='Answer',
17fields=[
18('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
19('answer', models.CharField(max_length=64, verbose_name='Ответ')),
20],
21),
22migrations.CreateModel(
23name='Category',
24fields=[
25('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
26('name', models.CharField(max_length=64, verbose_name='Категория')),
27],
28),
29migrations.CreateModel(
30name='Question',
31fields=[
32('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
33('question', models.CharField(max_length=128, verbose_name='Вопрос')),
34('is_validated', models.BooleanField(default=False, verbose_name='Одобрен')),
35('answer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.answer', verbose_name='Правильный ответ')),
36('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.category', verbose_name='Тема вопроса')),
37],
38),
39migrations.CreateModel(
40name='Type',
41fields=[
42('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
43('name', models.CharField(max_length=64, verbose_name='Тип')),
44],
45),
46migrations.CreateModel(
47name='SubType',
48fields=[
49('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
50('name', models.CharField(max_length=64, verbose_name='Подтип')),
51('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subtypes', to='questions.type', verbose_name='Тип')),
52],
53),
54migrations.CreateModel(
55name='Remark',
56fields=[
57('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
58('text', models.CharField(max_length=128, verbose_name='Замечание')),
59('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.question', verbose_name='Вопрос')),
60],
61),
62migrations.CreateModel(
63name='QuestionComplaint',
64fields=[
65('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
66('text', models.CharField(max_length=128, verbose_name='Жалоба')),
67('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.question', verbose_name='Вопрос')),
68],
69),
70migrations.AddField(
71model_name='answer',
72name='subtype',
73field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.subtype', verbose_name='Подтип'),
74),
75]
76