feat: stlog添加约束

This commit is contained in:
caoqianming 2024-05-13 23:06:47 +08:00
parent da444f720d
commit 3fc8e17266
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2024-05-13 15:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mtm', '0028_shift_sort'),
('wpm', '0042_mlog_count_n_thhs'),
]
operations = [
migrations.AlterUniqueTogether(
name='stlog',
unique_together={('mgroup', 'start_time')},
),
]

View File

@ -65,6 +65,10 @@ class StLog(CommonADModel):
measure = models.TextField('处置措施', default='', max_length=100)
handler = models.CharField('处理人', default='', max_length=100)
class Meta:
unique_together = ('mgroup', 'start_time')
class SfLogExp(CommonADModel):
"""