add: add new field to Inventory model

This commit is contained in:
behruz-dev
2025-08-27 10:25:09 +05:00
parent 8fde368204
commit 500143fb09
4 changed files with 31 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2.4 on 2025-08-27 10:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wherehouse', '0006_inventory_is_invalid'),
]
operations = [
migrations.AddField(
model_name='inventory',
name='unit_price',
field=models.PositiveBigIntegerField(default=0),
),
]

View File

@@ -27,6 +27,7 @@ class Inventory(BaseModel):
related_name='inventories'
)
is_invalid = models.BooleanField(default=False)
unit_price = models.PositiveBigIntegerField(default=0)
def __str__(self):
return f'{self.product} in {self.wherehouse}'