mirror of
https://github.com/evgen-app/evg-app-back.git
synced 2024-11-24 09:43:45 +03:00
126 lines
5.5 KiB
Python
126 lines
5.5 KiB
Python
# Generated by Django 3.1.5 on 2021-02-05 08:53
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('organisations', '0005_auto_20210120_1944'),
|
|
]
|
|
|
|
operations = [
|
|
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)),
|
|
],
|
|
),
|
|
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')),
|
|
],
|
|
),
|
|
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'),
|
|
),
|
|
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')),
|
|
],
|
|
),
|
|
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')),
|
|
],
|
|
),
|
|
]
|