import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart'; class ElectronicKeyEntity { int? errorCode; String? description; String? errorMsg; ElectronicKeyListItem? data; ElectronicKeyEntity( {this.errorCode, this.description, this.errorMsg, this.data}); ElectronicKeyEntity.fromJson(Map json) { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; data = json['data'] != null ? ElectronicKeyListItem.fromJson(json['data']) : null; } Map toJson() { final Map data = {}; data['errorCode'] = errorCode; data['description'] = description; data['errorMsg'] = errorMsg; if (this.data != null) { data['data'] = this.data!.toJson(); } return data; } }