app-starlock/lib/login/register/entity/SendValidationCodeEntity.dart

60 lines
1.4 KiB
Dart
Raw Normal View History

class SendValidationCodeEntity {
SendValidationCodeEntity({
this.description,
this.errorCode,
this.content,
this.errorMsg,});
SendValidationCodeEntity.fromJson(dynamic json) {
description = json['description'];
errorCode = json['errorCode'];
content = json['content'] != null ? Data.fromJson(json['content']) : null;
errorMsg = json['errorMsg'];
}
String? description;
int? errorCode;
Data? content;
String? errorMsg;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['description'] = description;
map['errorCode'] = errorCode;
if (content != null) {
map['data'] = content!.toJson();
}
map['errorMsg'] = errorMsg;
return map;
}
}
class Data {
Data({
this.originalImageBase64,
this.jigsawImageBase64,
this.secretKey,
this.token});
Data.fromJson(dynamic json) {
originalImageBase64 = json['originalImageBase64'];
jigsawImageBase64 = json['jigsawImageBase64'];
secretKey = json['secretKey'];
token = json['token'];
}
int? originalImageBase64;
String? jigsawImageBase64;
String? secretKey;
String? token;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['originalImageBase64'] = originalImageBase64;
map['jigsawImageBase64'] = jigsawImageBase64;
map['secretKey'] = secretKey;
map['token'] = token;
return map;
}
}