Exesize
33 строки · 1.6 Кб
1# Generated by Django 4.0.4 on 2022-06-03 13:57
2
3import django.db.models.deletion4from django.conf import settings5from django.db import migrations, models6
7
8class Migration(migrations.Migration):9
10dependencies = [11migrations.swappable_dependency(settings.AUTH_USER_MODEL),12('mainapp', '0003_alter_courses_options_alter_courseteachers_options'),13]14
15operations = [16migrations.CreateModel(17name='CourseFeedback',18fields=[19('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),20('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Создан')),21('updated_at', models.DateTimeField(auto_now=True, verbose_name='Обновлён')),22('deleted', models.BooleanField(default=False, verbose_name='Удалён')),23('feedback', models.TextField(default='Без отзыва', verbose_name='Отзыв')),24('rating', models.PositiveSmallIntegerField(choices=[(5, '⭐⭐⭐⭐⭐'), (4, '⭐⭐⭐⭐'), (3, '⭐⭐⭐'), (2, '⭐⭐'), (1, '⭐')], default=5, verbose_name='Рейтинг')),25('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainapp.courses', verbose_name='Курс')),26('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')),27],28options={29'verbose_name': 'Рейтинг',30'verbose_name_plural': 'Рейтинги',31},32),33]34