|
@@ -1,5 +1,6 @@
|
|
|
-# Generated by Django 3.0.8 on 2020-07-24 07:47
|
|
|
+# Generated by Django 3.0.8 on 2020-08-03 07:49
|
|
|
|
|
|
+from django.conf import settings
|
|
|
from django.db import migrations, models
|
|
|
import django.db.models.deletion
|
|
|
|
|
@@ -9,16 +10,10 @@ class Migration(migrations.Migration):
|
|
|
initial = True
|
|
|
|
|
|
dependencies = [
|
|
|
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
]
|
|
|
|
|
|
operations = [
|
|
|
- migrations.CreateModel(
|
|
|
- name='Post',
|
|
|
- fields=[
|
|
|
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
- ('name', models.CharField(max_length=50)),
|
|
|
- ],
|
|
|
- ),
|
|
|
migrations.CreateModel(
|
|
|
name='Dapt',
|
|
|
fields=[
|
|
@@ -34,4 +29,44 @@ class Migration(migrations.Migration):
|
|
|
'abstract': False,
|
|
|
},
|
|
|
),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='Post',
|
|
|
+ fields=[
|
|
|
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
+ ('name', models.CharField(max_length=50)),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='PostUser',
|
|
|
+ fields=[
|
|
|
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
+ ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_post', to='relation.Post', verbose_name='岗位')),
|
|
|
+ ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'unique_together': {('post', 'user')},
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='DaptUser',
|
|
|
+ fields=[
|
|
|
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
+ ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_dapt', to='relation.Dapt', verbose_name='部门')),
|
|
|
+ ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'unique_together': {('dapt', 'user')},
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='DaptPost',
|
|
|
+ fields=[
|
|
|
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
+ ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_dapt', to='relation.Dapt', verbose_name='部门')),
|
|
|
+ ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_post', to='relation.Post', verbose_name='岗位')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'unique_together': {('dapt', 'post')},
|
|
|
+ },
|
|
|
+ ),
|
|
|
]
|