feat: wmaterial 创建联合主键
This commit is contained in:
parent
03ae93f7e9
commit
e544c1112d
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 3.2.12 on 2023-11-01 10:15
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mtm', '0022_alter_material_cate'),
|
||||
('system', '0002_myschedule'),
|
||||
('wpm', '0025_auto_20231101_1751'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='wmaterial',
|
||||
unique_together={('material', 'batch', 'belong_dept')},
|
||||
),
|
||||
]
|
|
@ -78,6 +78,9 @@ class WMaterial(CommonBDModel):
|
|||
batch = models.CharField('批次号', max_length=50)
|
||||
count = models.PositiveIntegerField('当前数量', default=0)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('material', 'batch', 'belong_dept')
|
||||
|
||||
|
||||
class Mlog(CommonADModel):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue