evg-app-back/lessons/migrations/0001_initial.py

126 lines
5.5 KiB
Python
Raw Permalink Normal View History

2021-02-06 11:37:54 +03:00
# Generated by Django 3.1.5 on 2021-02-05 08:53
2021-01-10 15:51:59 +03:00
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
2021-02-06 11:37:54 +03:00
('organisations', '0005_auto_20210120_1944'),
2021-01-10 15:51:59 +03:00
]
operations = [
2021-02-06 11:37:54 +03:00
migrations.CreateModel(
name='Lesson',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.TextField(default='')),
('descr', models.TextField(default='')),
('content', models.TextField(default='')),
('time_lesson', models.DateTimeField(auto_now=True)),
],
),
2021-01-10 15:51:59 +03:00
migrations.CreateModel(
name='Subject',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.organisation')),
('teachers_give', models.ManyToManyField(to='organisations.Teacher')),
],
),
2021-02-06 11:37:54 +03:00
migrations.CreateModel(
name='Task',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('theory', models.TextField()),
('practise', models.TextField()),
('number', models.IntegerField()),
('max_score', models.IntegerField(default=0)),
],
),
migrations.CreateModel(
name='Type',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.TextField(max_length=150)),
],
),
migrations.CreateModel(
name='Theme',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=150)),
('tasks', models.ManyToManyField(to='lessons.Task')),
],
),
migrations.CreateModel(
name='Tests',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=150)),
('deadline', models.DateTimeField()),
('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.lesson')),
],
),
migrations.AddField(
model_name='task',
name='test',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tests'),
),
migrations.AddField(
model_name='task',
name='types',
field=models.ManyToManyField(to='lessons.Type'),
),
2021-01-10 15:51:59 +03:00
migrations.CreateModel(
name='SubjectClassLocal',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.group')),
('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.subject')),
('teachers', models.ManyToManyField(to='organisations.Teacher')),
],
),
2021-02-06 11:37:54 +03:00
migrations.CreateModel(
name='Materials',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('link', models.URLField()),
('name', models.CharField(blank=True, max_length=100)),
('data', models.TextField(blank=True)),
('Type', models.CharField(default='link', max_length=100)),
('lesson', models.ForeignKey(default=3, on_delete=django.db.models.deletion.CASCADE, to='lessons.lesson')),
],
),
migrations.AddField(
model_name='lesson',
name='type_lesson',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.subjectclasslocal'),
),
migrations.CreateModel(
name='AnswerSheet',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('completed', models.BooleanField(default=False)),
('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.child')),
('test', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tests')),
],
),
migrations.CreateModel(
name='Answer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('content', models.TextField()),
('number', models.IntegerField()),
('completed', models.BooleanField(default=False)),
('score', models.IntegerField(default=0)),
('sheet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.answersheet')),
],
),
2021-01-10 15:51:59 +03:00
]