0001_initial.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Generated by Django 3.0.8 on 2020-07-24 07:47
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='DailyMptt',
  13. fields=[
  14. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('title', models.CharField(max_length=50)),
  16. ('content', models.TextField()),
  17. ('create_at', models.DateTimeField(auto_now=True)),
  18. ('son_size', models.IntegerField(default=0)),
  19. ('lft', models.PositiveIntegerField(editable=False)),
  20. ('rght', models.PositiveIntegerField(editable=False)),
  21. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  22. ('level', models.PositiveIntegerField(editable=False)),
  23. ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  24. ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='detailmptt.DailyMptt', verbose_name='上级区域')),
  25. ],
  26. options={
  27. 'abstract': False,
  28. },
  29. ),
  30. ]