from django.db import models class Product(models.Model): """ Stores product details """ item_id = models.CharField(max_length=100, unique=True) product_name = models.CharField(max_length=255) product_long_description = models.TextField(blank=True, null=True) product_short_description = models.TextField(blank=True, null=True) product_type = models.CharField(max_length=100, blank=True, null=True) image_path = models.CharField(max_length=500, blank=True, null=True) image = models.ImageField(upload_to='products/', blank=True, null=True) def __str__(self): return f"{self.product_name} ({self.item_id})"