# Generated by Django 3.0 on 2019-12-05 23:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('location', models.CharField(max_length=70)),
                ('text', models.TextField()),
                ('updateDate', models.DateTimeField()),
                ('duration', models.DurationField()),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='proceduresarticle_related', related_query_name='proceduresarticle', to='users.Student')),
                ('helpers', models.ManyToManyField(to='users.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Badge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ImageField(upload_to='')),
                ('name', models.CharField(help_text='--> nom du badge', max_length=70, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='')),
                ('tag', models.CharField(max_length=25)),
                ('addedDate', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='--> nom du tag', max_length=70, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Step',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('order', models.IntegerField()),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.Article')),
            ],
        ),
        migrations.CreateModel(
            name='ContentStep',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('ONL', 'En ligne'), ('IRL', 'Physique')], default='ONL', max_length=3)),
                ('text', models.TextField()),
                ('duration', models.DurationField()),
                ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.File')),
                ('step', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.Step')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('like', models.IntegerField()),
                ('date', models.DateField()),
                ('contentStep', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.ContentStep')),
                ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.File')),
                ('tag', models.ManyToManyField(to='procedures.Tag')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Student')),
            ],
        ),
        migrations.AddField(
            model_name='article',
            name='tag',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.Tag'),
        ),
    ]

# Generated by Django 3.0 on 2019-12-05 23:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('location', models.CharField(max_length=70)),
                ('text', models.TextField()),
                ('updateDate', models.DateTimeField()),
                ('duration', models.DurationField()),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='proceduresarticle_related', related_query_name='proceduresarticle', to='users.Student')),
                ('helpers', models.ManyToManyField(to='users.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Badge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ImageField(upload_to='')),
                ('name', models.CharField(help_text='--> nom du badge', max_length=70, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='')),
                ('tag', models.CharField(max_length=25)),
                ('addedDate', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='--> nom du tag', max_length=70, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Step',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('order', models.IntegerField()),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.Article')),
            ],
        ),
        migrations.CreateModel(
            name='ContentStep',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('ONL', 'En ligne'), ('IRL', 'Physique')], default='ONL', max_length=3)),
                ('text', models.TextField()),
                ('duration', models.DurationField()),
                ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.File')),
                ('step', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.Step')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('like', models.IntegerField()),
                ('date', models.DateField()),
                ('contentStep', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.ContentStep')),
                ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.File')),
                ('tag', models.ManyToManyField(to='procedures.Tag')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Student')),
            ],
        ),
        migrations.AddField(
            model_name='article',
            name='tag',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='procedures.Tag'),
        ),
    ]

# Generated by Django 3.0 on 2019-12-05 23:41