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)