0001_initial.py 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Generated by Django 3.0.8 on 2020-07-23 08:23
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. import mptt.fields
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. ]
  9. operations = [
  10. migrations.CreateModel(
  11. name='Dept',
  12. fields=[
  13. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  14. ('name', models.CharField(max_length=50)),
  15. ('lft', models.PositiveIntegerField(editable=False)),
  16. ('rght', models.PositiveIntegerField(editable=False)),
  17. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  18. ('level', models.PositiveIntegerField(editable=False)),
  19. ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='even_table.Dept')),
  20. ],
  21. options={
  22. 'verbose_name': '部门表',
  23. },
  24. ),
  25. migrations.CreateModel(
  26. name='Jobs',
  27. fields=[
  28. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  29. ('name', models.CharField(max_length=50)),
  30. ],
  31. options={
  32. 'verbose_name': '岗位表',
  33. },
  34. ),
  35. migrations.CreateModel(
  36. name='Dept2Jobs',
  37. fields=[
  38. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  39. ('lft', models.PositiveIntegerField(editable=False)),
  40. ('rght', models.PositiveIntegerField(editable=False)),
  41. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  42. ('level', models.PositiveIntegerField(editable=False)),
  43. ('dept', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='even_table.Dept')),
  44. ('job', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='even_table.Jobs')),
  45. ],
  46. options={
  47. 'verbose_name': '部门岗位关联表',
  48. },
  49. ),
  50. ]