class ServiceListModel {
  final int id;
  final String service;
  final String icon;

  ServiceListModel({
    required this.id,
    required this.service,
    required this.icon,
  });

  factory ServiceListModel.fromJson(Map<String, dynamic> json) {
    return ServiceListModel(
      id: json['id'] ?? 0,
      service: json['service'] ?? '',
      icon: json['icon'] ?? '',
    );
  }

  Map<String, dynamic> toJson() {
    return {'id': id, 'service': service, 'icon': icon};
  }
}

class ServiceListResponse {
  final String status;
  final List<ServiceListModel> data;

  ServiceListResponse({required this.status, required this.data});

  factory ServiceListResponse.fromJson(Map<String, dynamic> json) {
    return ServiceListResponse(
      status: json['status'] ?? '',
      data: (json['data'] as List<dynamic>)
          .map((e) => ServiceListModel.fromJson(e))
          .toList(),
    );
  }

  Map<String, dynamic> toJson() {
    return {'status': status, 'data': data.map((e) => e.toJson()).toList()};
  }
}
