toMap method
Implementation
Map<String, dynamic> toMap() => {
'id': id,
'name': name,
'description': description,
'price': price,
'type': type.index,
'listingType': listingType.index,
'sellerId': sellerId,
'location': location,
'createdAt': createdAt.toIso8601String(),
'images': images,
'isAvailable': isAvailable,
};