import 'featured_product.dart';

class SearchProductResponse {
  String? status;
  String? messages;
  List<FeaturedProduct>? data;

  SearchProductResponse({this.status, this.messages, this.data});

  SearchProductResponse.fromJson(Map<String, dynamic> json) {
    status = json['status'];
    messages = json['messages'];
    if (json['data'] != null) {
      data = <FeaturedProduct>[];
      json['data'].forEach((v) {
        data!.add(new FeaturedProduct.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['status'] = this.status;
    data['messages'] = this.messages;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
