Creates Map from Class Object
Map
Map<String, dynamic> toJson() => { 'id': id, 'type': type.toJson(), };