import 'package:hoshan/data/model/ai/bots_model.dart';

class GlobalAssistantBotsModel {
  List<GlobalAssistant>? categories;

  GlobalAssistantBotsModel({this.categories});

  GlobalAssistantBotsModel.fromJson(Map<String, dynamic> json) {
    if (json['categories'] != null) {
      categories = <GlobalAssistant>[];
      json['categories'].forEach((v) {
        categories!.add(GlobalAssistant.fromJson(v));
      });
    }
  }

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

class GlobalAssistant {
  String? categoryName;
  List<Bots>? bots;

  GlobalAssistant({this.categoryName, this.bots});

  GlobalAssistant.fromJson(Map<String, dynamic> json) {
    categoryName = json['category_name'];
    if (json['bots'] != null) {
      bots = <Bots>[];
      json['bots'].forEach((v) {
        bots!.add(Bots.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['category_name'] = categoryName;
    if (bots != null) {
      data['bots'] = bots!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
