1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- # Generated by Django 3.0.8 on 2020-07-23 08:23
- from django.db import migrations, models
- import django.db.models.deletion
- import mptt.fields
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ]
- operations = [
- migrations.CreateModel(
- name='Dept',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=50)),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='even_table.Dept')),
- ],
- options={
- 'verbose_name': '部门表',
- },
- ),
- migrations.CreateModel(
- name='Jobs',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=50)),
- ],
- options={
- 'verbose_name': '岗位表',
- },
- ),
- migrations.CreateModel(
- name='Dept2Jobs',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ('dept', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='even_table.Dept')),
- ('job', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='even_table.Jobs')),
- ],
- options={
- 'verbose_name': '部门岗位关联表',
- },
- ),
- ]
|