This commit is contained in:
behruz-dev
2025-10-06 18:15:58 +05:00
parent 5ae183b33d
commit 7893b18c6b
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2.4 on 2025-10-06 18:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0006_alter_product_type'),
]
operations = [
migrations.AlterField(
model_name='product',
name='name',
field=models.CharField(max_length=200, unique=True),
),
]

View File

@@ -12,7 +12,7 @@ class Product(BaseModel):
("SERVICE", 'xizmat')
)
name = models.CharField(max_length=200)
name = models.CharField(max_length=200, unique=True)
type = models.CharField(max_length=20, choices=TYPE, default="TANGIBLE")
unity = models.ForeignKey(
'products.Unity', on_delete=models.SET_NULL, related_name='products', null=True