0001_initial.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Generated by Django 3.0.8 on 2020-07-21 08:51
  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='SchoolDept',
  11. fields=[
  12. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  13. ('name', models.CharField(max_length=20)),
  14. ('remark', models.TextField(null=True)),
  15. ('create_at', models.DateField(auto_now_add=True, verbose_name='创建人')),
  16. ('update_at', models.DateField(auto_now=True, null=True, verbose_name='最后修改时间')),
  17. ('lft', models.PositiveIntegerField(editable=False)),
  18. ('rght', models.PositiveIntegerField(editable=False)),
  19. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  20. ('level', models.PositiveIntegerField(editable=False)),
  21. ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='workTtree.SchoolDept')),
  22. ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='workTtree.SchoolDept', verbose_name='最后修改人')),
  23. ],
  24. options={
  25. 'verbose_name': '学校部门树形结构',
  26. 'verbose_name_plural': '学校部门树形结构列表',
  27. 'db_table': 'school_dept_tree',
  28. },
  29. ),
  30. ]