0001_initial.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Generated by Django 3.0.8 on 2020-07-24 07:47
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. class Migration(migrations.Migration):
  5. initial = True
  6. dependencies = [
  7. ]
  8. operations = [
  9. migrations.CreateModel(
  10. name='Post',
  11. fields=[
  12. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  13. ('name', models.CharField(max_length=50)),
  14. ],
  15. ),
  16. migrations.CreateModel(
  17. name='Dapt',
  18. fields=[
  19. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  20. ('name', models.CharField(max_length=50)),
  21. ('lft', models.PositiveIntegerField(editable=False)),
  22. ('rght', models.PositiveIntegerField(editable=False)),
  23. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  24. ('level', models.PositiveIntegerField(editable=False)),
  25. ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pid', to='relation.Dapt', verbose_name='上级部门')),
  26. ],
  27. options={
  28. 'abstract': False,
  29. },
  30. ),
  31. ]