From a435834a3395071e9464f8ea0ba7cef4143fa19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Tue, 7 Jun 2022 14:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0grade=20=E4=B8=BA=E5=AE=9E?= =?UTF-8?q?=E9=AA=8C=E5=AE=A4=E6=A3=80=E9=AA=8C=E6=9C=BA=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0036_auto_20220607_1445.py | 18 ++++++++++++++++++ server/apps/ability/models.py | 6 ++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 server/apps/ability/migrations/0036_auto_20220607_1445.py diff --git a/server/apps/ability/migrations/0036_auto_20220607_1445.py b/server/apps/ability/migrations/0036_auto_20220607_1445.py new file mode 100644 index 0000000..6e7fe28 --- /dev/null +++ b/server/apps/ability/migrations/0036_auto_20220607_1445.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.5 on 2022-06-07 06:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ability', '0035_auto_20220607_0900'), + ] + + operations = [ + migrations.AlterField( + model_name='quali', + name='grade', + field=models.PositiveSmallIntegerField(blank=True, choices=[(10, '国家级'), (20, '省级'), (30, '市级'), (40, '实验室'), (50, '检验机构')], null=True, verbose_name='等级1'), + ), + ] diff --git a/server/apps/ability/models.py b/server/apps/ability/models.py index aa84f45..a73bada 100644 --- a/server/apps/ability/models.py +++ b/server/apps/ability/models.py @@ -143,12 +143,14 @@ class Quali(CommonAModel): QUALI_GRADE_CHOICES = ( (10, '国家级'), (20, '省级'), - (30, '市级') + (30, '市级'), + (40, '实验室'), + (50, '检验机构') ) org = models.ForeignKey(Organization, on_delete=models.CASCADE, verbose_name='所属单位') name = models.CharField('资质名称', max_length=20, null=True, blank=True) type = models.CharField('资质类型', choices=QUALI_TYPE_CHOICES, max_length=10) - grade = models.PositiveSmallIntegerField('等级1', null=True, blank=True) + grade = models.PositiveSmallIntegerField('等级1', null=True, blank=True, choices=QUALI_GRADE_CHOICES) scope = models.TextField('范围', null=True, blank=True) level = models.CharField('等级2', max_length=10, null=True, blank=True) province = models.ForeignKey(Province, on_delete=models.SET_NULL, null=True, blank=True)