aman-satu-flutter/lib/core/models/flow/sell_response.dart

40 lines
1.0 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) {
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<String, dynamic> toJson() => {
'journal_id': journalId,
'check': check,
'check_png': checkPng,
'check_txt': checkTxt,
'info': info,
'message': message,
'operation': operation,
};
}