0002_grouproutermenu_routermenu.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Generated by Django 3.0.8 on 2020-08-06 11:20
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. import mptt.fields
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. ('auth', '0011_update_proxy_permissions'),
  8. ('basic', '0001_initial'),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='RouterMenu',
  13. fields=[
  14. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('name', models.CharField(max_length=50)),
  16. ('path', models.CharField(max_length=50)),
  17. ('url', models.CharField(max_length=50)),
  18. ('lft', models.PositiveIntegerField(editable=False)),
  19. ('rght', models.PositiveIntegerField(editable=False)),
  20. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  21. ('level', models.PositiveIntegerField(editable=False)),
  22. ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='basic.RouterMenu')),
  23. ],
  24. options={
  25. 'verbose_name': '前端菜单',
  26. 'verbose_name_plural': '前端菜单列表',
  27. },
  28. ),
  29. migrations.CreateModel(
  30. name='GroupRouterMenu',
  31. fields=[
  32. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  33. ('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='auth.Group')),
  34. ('menu', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='basic.RouterMenu')),
  35. ],
  36. options={
  37. 'verbose_name': '前端菜单与角色的中间表',
  38. 'verbose_name_plural': '前端菜单和角色的中间表列表',
  39. },
  40. ),
  41. ]