class BotsModel { int? id; String? name; String? image; String? description; List? attachmentType; int? attachment; bool? editable; BotsModel({this.id, this.name, this.image}); BotsModel.fromJson(Map json) { id = json['id']; name = json['name']; image = json['image']; description = json['description']; if (json['attachmentType'] != null) { attachmentType = []; json['attachmentType'].forEach((v) { attachmentType!.add(v); }); } attachment = json['attachment']; editable = json['editable']; } Map toJson() { final Map data = {}; data['id'] = id; data['name'] = name; data['image'] = image; data['description'] = description; if (attachmentType != null) { data['attachmentType'] = attachmentType!.map((v) => v).toList(); } data['attachment'] = attachment; data['editable'] = editable; return data; } }