| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- import 'package:bbyyy/beans/use_x_ray_flow_bean_entity.dart';
- useXRayFlowBeanEntityFromJson(UseXRayFlowBeanEntity data, Map<String, dynamic> json) {
- if (json['data'] != null) {
- data.data = UseXRayFlowBeanData().fromJson(json['data']);
- }
- if (json['error'] != null) {
- data.error = json['error'].toString();
- }
- return data;
- }
- Map<String, dynamic> useXRayFlowBeanEntityToJson(UseXRayFlowBeanEntity entity) {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['data'] = entity.data?.toJson();
- data['error'] = entity.error;
- return data;
- }
- useXRayFlowBeanDataFromJson(UseXRayFlowBeanData data, Map<String, dynamic> json) {
- if (json['Valid'] != null) {
- data.valid = json['Valid'];
- }
- if (json['Flows'] != null) {
- data.flows = (json['Flows'] as List).map((v) => UseXRayFlowBeanDataFlows().fromJson(v)).toList();
- }
- return data;
- }
- Map<String, dynamic> useXRayFlowBeanDataToJson(UseXRayFlowBeanData entity) {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['Valid'] = entity.valid;
- data['Flows'] = entity.flows?.map((v) => v.toJson())?.toList();
- return data;
- }
- useXRayFlowBeanDataFlowsFromJson(UseXRayFlowBeanDataFlows data, Map<String, dynamic> json) {
- if (json['id'] != null) {
- data.id = json['id'] is String
- ? int.tryParse(json['id'])
- : json['id'].toInt();
- }
- if (json['Type'] != null) {
- data.type = json['Type'] is String
- ? int.tryParse(json['Type'])
- : json['Type'].toInt();
- }
- if (json['user_uid'] != null) {
- data.userUid = json['user_uid'] is String
- ? int.tryParse(json['user_uid'])
- : json['user_uid'].toInt();
- }
- if (json['UserName'] != null) {
- data.userName = json['UserName'].toString();
- }
- if (json['UserPic'] != null) {
- data.userPic = json['UserPic'].toString();
- }
- if (json['trade_uid'] != null) {
- data.tradeUid = json['trade_uid'] is String
- ? int.tryParse(json['trade_uid'])
- : json['trade_uid'].toInt();
- }
- if (json['TraderName'] != null) {
- data.traderName = json['TraderName'].toString();
- }
- if (json['TraderPic'] != null) {
- data.traderPic = json['TraderPic'].toString();
- }
- if (json['pay_time'] != null) {
- data.payTime = json['pay_time'].toString();
- }
- if (json['PayWay'] != null) {
- data.payWay = json['PayWay'] is String
- ? int.tryParse(json['PayWay'])
- : json['PayWay'].toInt();
- }
- if (json['paid_amount'] != null) {
- data.paidAmount = json['paid_amount'] is String
- ? double.tryParse(json['paid_amount'])
- : json['paid_amount'].toDouble();
- }
- if (json['user_balance'] != null) {
- data.userBalance = json['user_balance'] is String
- ? double.tryParse(json['user_balance'])
- : json['user_balance'].toDouble();
- }
- if (json['order_uid'] != null) {
- data.orderUid = json['order_uid'] is String
- ? int.tryParse(json['order_uid'])
- : json['order_uid'].toInt();
- }
- if (json['peer_flow_id'] != null) {
- data.peerFlowId = json['peer_flow_id'] is String
- ? int.tryParse(json['peer_flow_id'])
- : json['peer_flow_id'].toInt();
- }
- if (json['remark'] != null) {
- data.remark = json['remark'].toString();
- }
- return data;
- }
- Map<String, dynamic> useXRayFlowBeanDataFlowsToJson(UseXRayFlowBeanDataFlows entity) {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = entity.id;
- data['Type'] = entity.type;
- data['user_uid'] = entity.userUid;
- data['UserName'] = entity.userName;
- data['UserPic'] = entity.userPic;
- data['trade_uid'] = entity.tradeUid;
- data['TraderName'] = entity.traderName;
- data['TraderPic'] = entity.traderPic;
- data['pay_time'] = entity.payTime;
- data['PayWay'] = entity.payWay;
- data['paid_amount'] = entity.paidAmount;
- data['user_balance'] = entity.userBalance;
- data['order_uid'] = entity.orderUid;
- data['peer_flow_id'] = entity.peerFlowId;
- data['remark'] = entity.remark;
- return data;
- }
|