@override Object toJson() => { if (key != null) 'key': key, if (compositeKey != null) 'compositeKey': compositeKey!.toJson(), };