0001_initial.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Generated by Django 3.0.8 on 2020-07-28 08:27
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import mptt.fields
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='Menu',
  14. fields=[
  15. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  16. ('name', models.CharField(max_length=100)),
  17. ('config', models.TextField()),
  18. ('create_at', models.DateTimeField(auto_now_add=True)),
  19. ('code', models.CharField(max_length=100)),
  20. ('lft', models.PositiveIntegerField(editable=False)),
  21. ('rght', models.PositiveIntegerField(editable=False)),
  22. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  23. ('level', models.PositiveIntegerField(editable=False)),
  24. ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  25. ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='basic.Menu')),
  26. ],
  27. options={
  28. 'verbose_name': '报表菜单',
  29. 'verbose_name_plural': '报表菜单列表',
  30. 'db_table': 'basic_menu',
  31. },
  32. ),
  33. ]