# Generated by Django 4.2.7 on 2025-08-27 08:37

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Mindmap',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_name', models.CharField(default='思维导图', max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'mindmaps',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='MindmapNode',
            fields=[
                ('id', models.CharField(default=uuid.uuid4, max_length=255, primary_key=True, serialize=False)),
                ('is_root', models.BooleanField(default=False)),
                ('parent_id', models.CharField(blank=True, max_length=255, null=True)),
                ('children_count', models.IntegerField(default=0)),
                ('depth', models.IntegerField(default=0)),
                ('title', models.CharField(blank=True, default='', max_length=500)),
                ('desc', models.TextField(blank=True, default='')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted', models.BooleanField(default=False)),
                ('mindmap', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='nodes', to='mindmap.mindmap')),
            ],
            options={
                'db_table': 'nodes',
                'ordering': ['created_at'],
            },
        ),
    ]
