import 'package:hoshan/data/model/tools_categories_model.dart';

class AssistantPersonalInfoModel {
  AssistantPersonalInfo? assistantPersonalInfo;

  AssistantPersonalInfoModel({this.assistantPersonalInfo});

  AssistantPersonalInfoModel.fromJson(Map<String, dynamic> json) {
    assistantPersonalInfo = json['bot'] != null
        ? AssistantPersonalInfo.fromJson(json['bot'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (assistantPersonalInfo != null) {
      data['bot'] = assistantPersonalInfo!.toJson();
    }
    return data;
  }
}

class AssistantPersonalInfo {
  int? id;
  String? image;
  String? model;
  String? name;
  String? prompt;
  String? description;
  bool? public;
  List<String>? links;
  List<String>? docs;
  Categories? category;

  AssistantPersonalInfo(
      {this.id,
      this.image,
      this.model,
      this.name,
      this.prompt,
      this.description,
      this.public,
      this.links,
      this.category});

  AssistantPersonalInfo.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    image = json['image'];
    model = json['model'];
    name = json['name'];
    prompt = json['prompt'];
    description = json['description'];
    public = json['public'];
    links = json['links'] != null ? json['links'].cast<String>() : [];
    docs = json['docs'] != null ? json['docs'].cast<String>() : [];
    category =
        json['category'] != null ? Categories.fromJson(json['category']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['image'] = image;
    data['model'] = model;
    data['name'] = name;
    data['prompt'] = prompt;
    data['description'] = description;
    data['public'] = public;
    data['links'] = links;
    data['docs'] = docs;
    if (category != null) {
      data['category'] = category!.toJson();
    }
    return data;
  }
}
