toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'description': description,
'category': category,
'brand': brand,
'color': color,
'isAvailable': isAvailable,
'quantity': quantity,
'imageUrl': imageUrl,
'price': price,
'createdAt': createdAt.toIso8601String(),
'inventoryCount': inventoryCount,
'weight': weight,
'dimensions': dimensions,
'reviews': reviews,
'rating': rating,
'totalReviews': totalReviews,
};