32 lines
902 B
Dart
32 lines
902 B
Dart
|
|
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<String, dynamic> json) {
|
||
|
|
errorCode = json['errorCode'];
|
||
|
|
description = json['description'];
|
||
|
|
errorMsg = json['errorMsg'];
|
||
|
|
data = json['data'] != null
|
||
|
|
? ElectronicKeyListItem.fromJson(json['data'])
|
||
|
|
: null;
|
||
|
|
}
|
||
|
|
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||
|
|
data['errorCode'] = errorCode;
|
||
|
|
data['description'] = description;
|
||
|
|
data['errorMsg'] = errorMsg;
|
||
|
|
if (this.data != null) {
|
||
|
|
data['data'] = this.data!.toJson();
|
||
|
|
}
|
||
|
|
return data;
|
||
|
|
}
|
||
|
|
}
|