# Generated by Django 2.1.3 on 2018-11-20 03:33

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Concept',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=30)),
                ('content', models.TextField()),
                ('click_number', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='ForthRelationEntry',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('t_is_f', models.CharField(max_length=30, null=True)),
                ('related_concept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='forth_relation', to='knowledge.Concept')),
            ],
        ),
        migrations.CreateModel(
            name='Relation',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=30)),
                ('content', models.TextField()),
                ('color', models.CharField(max_length=10, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ToRelationEntry',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('f_is_t', models.CharField(max_length=30, null=True)),
                ('related_concept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_relation', to='knowledge.Concept')),
                ('relation_main', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='knowledge.Relation')),
            ],
        ),
        migrations.AddField(
            model_name='forthrelationentry',
            name='relation_main',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='knowledge.Relation'),
        ),
        migrations.AddField(
            model_name='forthrelationentry',
            name='to_partner_relation',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='forth_partner_relation', to='knowledge.ToRelationEntry'),
        ),
    ]
