Creates Map from Class Object
Map<String, dynamic> toJson() => { 'name': name, 'fields': fields.map((e) => e.toJson()).toList(growable: false), 'index': index, 'docs': docs, };