41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
Dart
import 'package:satu/core/utils/utils_parse.dart';
|
|
|
|
import 'check_bean.dart';
|
|
import 'info_bean.dart';
|
|
|
|
class SellResponse {
|
|
int? journalId;
|
|
CheckBean? check;
|
|
String? checkPng;
|
|
String? checkTxt;
|
|
InfoBean? info;
|
|
String? message;
|
|
late bool operation;
|
|
|
|
static SellResponse? fromMap(dynamic map) {
|
|
if (map == null) return null;
|
|
final SellResponse sellResponseBean = SellResponse();
|
|
sellResponseBean.journalId = cast<int>(map['journal_id']);
|
|
sellResponseBean.check = CheckBean.fromMap(map['check']);
|
|
sellResponseBean.checkPng = cast<String>(map['check_png']);
|
|
sellResponseBean.checkTxt = cast<String>(map['check_txt']);
|
|
sellResponseBean.info = InfoBean.fromMap(map['info']);
|
|
sellResponseBean.message = cast<String>(map['message']);
|
|
sellResponseBean.operation = cast<bool>(map['operation']) ?? false;
|
|
return sellResponseBean;
|
|
}
|
|
|
|
Map toJson() => {
|
|
'journal_id': journalId,
|
|
'check': check,
|
|
'check_png': checkPng,
|
|
'check_txt': checkTxt,
|
|
'info': info,
|
|
'message': message,
|
|
'operation': operation,
|
|
};
|
|
}
|
|
|
|
|
|
|