wurong
5 months ago
4 changed files with 333 additions and 395 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,323 @@ |
|||||||
|
import 'package:huixiang/generated/json/base/json_convert_content.dart'; |
||||||
|
import 'package:huixiang/data/invoices_history_list_entity.dart'; |
||||||
|
|
||||||
|
InvoicesHistoryListEntity $InvoicesHistoryListEntityFromJson( |
||||||
|
Map<String, dynamic> json) { |
||||||
|
final InvoicesHistoryListEntity invoicesHistoryListEntity = InvoicesHistoryListEntity(); |
||||||
|
final List<InvoicesHistoryListRecords>? records = (json['records'] as List< |
||||||
|
dynamic>?)?.map( |
||||||
|
(e) => |
||||||
|
jsonConvert.convert<InvoicesHistoryListRecords>( |
||||||
|
e) as InvoicesHistoryListRecords).toList(); |
||||||
|
if (records != null) { |
||||||
|
invoicesHistoryListEntity.records = records; |
||||||
|
} |
||||||
|
final String? total = jsonConvert.convert<String>(json['total']); |
||||||
|
if (total != null) { |
||||||
|
invoicesHistoryListEntity.total = total; |
||||||
|
} |
||||||
|
final String? size = jsonConvert.convert<String>(json['size']); |
||||||
|
if (size != null) { |
||||||
|
invoicesHistoryListEntity.size = size; |
||||||
|
} |
||||||
|
final String? current = jsonConvert.convert<String>(json['current']); |
||||||
|
if (current != null) { |
||||||
|
invoicesHistoryListEntity.current = current; |
||||||
|
} |
||||||
|
final List<InvoicesHistoryListOrders>? orders = (json['orders'] as List< |
||||||
|
dynamic>?)?.map( |
||||||
|
(e) => |
||||||
|
jsonConvert.convert<InvoicesHistoryListOrders>( |
||||||
|
e) as InvoicesHistoryListOrders).toList(); |
||||||
|
if (orders != null) { |
||||||
|
invoicesHistoryListEntity.orders = orders; |
||||||
|
} |
||||||
|
final bool? hitCount = jsonConvert.convert<bool>(json['hitCount']); |
||||||
|
if (hitCount != null) { |
||||||
|
invoicesHistoryListEntity.hitCount = hitCount; |
||||||
|
} |
||||||
|
final bool? searchCount = jsonConvert.convert<bool>(json['searchCount']); |
||||||
|
if (searchCount != null) { |
||||||
|
invoicesHistoryListEntity.searchCount = searchCount; |
||||||
|
} |
||||||
|
final String? pages = jsonConvert.convert<String>(json['pages']); |
||||||
|
if (pages != null) { |
||||||
|
invoicesHistoryListEntity.pages = pages; |
||||||
|
} |
||||||
|
return invoicesHistoryListEntity; |
||||||
|
} |
||||||
|
|
||||||
|
Map<String, dynamic> $InvoicesHistoryListEntityToJson( |
||||||
|
InvoicesHistoryListEntity entity) { |
||||||
|
final Map<String, dynamic> data = <String, dynamic>{}; |
||||||
|
data['records'] = entity.records?.map((v) => v.toJson()).toList(); |
||||||
|
data['total'] = entity.total; |
||||||
|
data['size'] = entity.size; |
||||||
|
data['current'] = entity.current; |
||||||
|
data['orders'] = entity.orders?.map((v) => v.toJson()).toList(); |
||||||
|
data['hitCount'] = entity.hitCount; |
||||||
|
data['searchCount'] = entity.searchCount; |
||||||
|
data['pages'] = entity.pages; |
||||||
|
return data; |
||||||
|
} |
||||||
|
|
||||||
|
extension InvoicesHistoryListEntityExtension on InvoicesHistoryListEntity { |
||||||
|
InvoicesHistoryListEntity copyWith({ |
||||||
|
List<InvoicesHistoryListRecords>? records, |
||||||
|
String? total, |
||||||
|
String? size, |
||||||
|
String? current, |
||||||
|
List<InvoicesHistoryListOrders>? orders, |
||||||
|
bool? hitCount, |
||||||
|
bool? searchCount, |
||||||
|
String? pages, |
||||||
|
}) { |
||||||
|
return InvoicesHistoryListEntity() |
||||||
|
..records = records ?? this.records |
||||||
|
..total = total ?? this.total |
||||||
|
..size = size ?? this.size |
||||||
|
..current = current ?? this.current |
||||||
|
..orders = orders ?? this.orders |
||||||
|
..hitCount = hitCount ?? this.hitCount |
||||||
|
..searchCount = searchCount ?? this.searchCount |
||||||
|
..pages = pages ?? this.pages; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
InvoicesHistoryListRecords $InvoicesHistoryListRecordsFromJson( |
||||||
|
Map<String, dynamic> json) { |
||||||
|
final InvoicesHistoryListRecords invoicesHistoryListRecords = InvoicesHistoryListRecords(); |
||||||
|
final String? id = jsonConvert.convert<String>(json['id']); |
||||||
|
if (id != null) { |
||||||
|
invoicesHistoryListRecords.id = id; |
||||||
|
} |
||||||
|
final String? createTime = jsonConvert.convert<String>(json['createTime']); |
||||||
|
if (createTime != null) { |
||||||
|
invoicesHistoryListRecords.createTime = createTime; |
||||||
|
} |
||||||
|
final String? createUser = jsonConvert.convert<String>(json['createUser']); |
||||||
|
if (createUser != null) { |
||||||
|
invoicesHistoryListRecords.createUser = createUser; |
||||||
|
} |
||||||
|
final String? updateTime = jsonConvert.convert<String>(json['updateTime']); |
||||||
|
if (updateTime != null) { |
||||||
|
invoicesHistoryListRecords.updateTime = updateTime; |
||||||
|
} |
||||||
|
final String? updateUser = jsonConvert.convert<String>(json['updateUser']); |
||||||
|
if (updateUser != null) { |
||||||
|
invoicesHistoryListRecords.updateUser = updateUser; |
||||||
|
} |
||||||
|
final String? phone = jsonConvert.convert<String>(json['phone']); |
||||||
|
if (phone != null) { |
||||||
|
invoicesHistoryListRecords.phone = phone; |
||||||
|
} |
||||||
|
final String? receivingPhone = jsonConvert.convert<String>( |
||||||
|
json['receivingPhone']); |
||||||
|
if (receivingPhone != null) { |
||||||
|
invoicesHistoryListRecords.receivingPhone = receivingPhone; |
||||||
|
} |
||||||
|
final String? mid = jsonConvert.convert<String>(json['mid']); |
||||||
|
if (mid != null) { |
||||||
|
invoicesHistoryListRecords.mid = mid; |
||||||
|
} |
||||||
|
final List<String>? orderIds = (json['orderIds'] as List<dynamic>?)?.map( |
||||||
|
(e) => jsonConvert.convert<String>(e) as String).toList(); |
||||||
|
if (orderIds != null) { |
||||||
|
invoicesHistoryListRecords.orderIds = orderIds; |
||||||
|
} |
||||||
|
final String? money = jsonConvert.convert<String>(json['money']); |
||||||
|
if (money != null) { |
||||||
|
invoicesHistoryListRecords.money = money; |
||||||
|
} |
||||||
|
final String? type = jsonConvert.convert<String>(json['type']); |
||||||
|
if (type != null) { |
||||||
|
invoicesHistoryListRecords.type = type; |
||||||
|
} |
||||||
|
final String? headerId = jsonConvert.convert<String>(json['headerId']); |
||||||
|
if (headerId != null) { |
||||||
|
invoicesHistoryListRecords.headerId = headerId; |
||||||
|
} |
||||||
|
final String? state = jsonConvert.convert<String>(json['state']); |
||||||
|
if (state != null) { |
||||||
|
invoicesHistoryListRecords.state = state; |
||||||
|
} |
||||||
|
final dynamic reviewerTime = json['reviewerTime']; |
||||||
|
if (reviewerTime != null) { |
||||||
|
invoicesHistoryListRecords.reviewerTime = reviewerTime; |
||||||
|
} |
||||||
|
final String? reviewerBy = jsonConvert.convert<String>(json['reviewerBy']); |
||||||
|
if (reviewerBy != null) { |
||||||
|
invoicesHistoryListRecords.reviewerBy = reviewerBy; |
||||||
|
} |
||||||
|
final dynamic ossUrl = json['ossUrl']; |
||||||
|
if (ossUrl != null) { |
||||||
|
invoicesHistoryListRecords.ossUrl = ossUrl; |
||||||
|
} |
||||||
|
final String? reason = jsonConvert.convert<String>(json['reason']); |
||||||
|
if (reason != null) { |
||||||
|
invoicesHistoryListRecords.reason = reason; |
||||||
|
} |
||||||
|
final int? isDelete = jsonConvert.convert<int>(json['isDelete']); |
||||||
|
if (isDelete != null) { |
||||||
|
invoicesHistoryListRecords.isDelete = isDelete; |
||||||
|
} |
||||||
|
final String? invoiceHeaderName = jsonConvert.convert<String>( |
||||||
|
json['invoiceHeaderName']); |
||||||
|
if (invoiceHeaderName != null) { |
||||||
|
invoicesHistoryListRecords.invoiceHeaderName = invoiceHeaderName; |
||||||
|
} |
||||||
|
final String? invoiceHeaderCode = jsonConvert.convert<String>( |
||||||
|
json['invoiceHeaderCode']); |
||||||
|
if (invoiceHeaderCode != null) { |
||||||
|
invoicesHistoryListRecords.invoiceHeaderCode = invoiceHeaderCode; |
||||||
|
} |
||||||
|
final dynamic orderList = json['orderList']; |
||||||
|
if (orderList != null) { |
||||||
|
invoicesHistoryListRecords.orderList = orderList; |
||||||
|
} |
||||||
|
final dynamic headertype = json['headertype']; |
||||||
|
if (headertype != null) { |
||||||
|
invoicesHistoryListRecords.headertype = headertype; |
||||||
|
} |
||||||
|
final dynamic companyAddr = json['companyAddr']; |
||||||
|
if (companyAddr != null) { |
||||||
|
invoicesHistoryListRecords.companyAddr = companyAddr; |
||||||
|
} |
||||||
|
final dynamic companyPhone = json['companyPhone']; |
||||||
|
if (companyPhone != null) { |
||||||
|
invoicesHistoryListRecords.companyPhone = companyPhone; |
||||||
|
} |
||||||
|
final dynamic bank = json['bank']; |
||||||
|
if (bank != null) { |
||||||
|
invoicesHistoryListRecords.bank = bank; |
||||||
|
} |
||||||
|
final dynamic bankNumber = json['bankNumber']; |
||||||
|
if (bankNumber != null) { |
||||||
|
invoicesHistoryListRecords.bankNumber = bankNumber; |
||||||
|
} |
||||||
|
return invoicesHistoryListRecords; |
||||||
|
} |
||||||
|
|
||||||
|
Map<String, dynamic> $InvoicesHistoryListRecordsToJson( |
||||||
|
InvoicesHistoryListRecords entity) { |
||||||
|
final Map<String, dynamic> data = <String, dynamic>{}; |
||||||
|
data['id'] = entity.id; |
||||||
|
data['createTime'] = entity.createTime; |
||||||
|
data['createUser'] = entity.createUser; |
||||||
|
data['updateTime'] = entity.updateTime; |
||||||
|
data['updateUser'] = entity.updateUser; |
||||||
|
data['phone'] = entity.phone; |
||||||
|
data['receivingPhone'] = entity.receivingPhone; |
||||||
|
data['mid'] = entity.mid; |
||||||
|
data['orderIds'] = entity.orderIds; |
||||||
|
data['money'] = entity.money; |
||||||
|
data['type'] = entity.type; |
||||||
|
data['headerId'] = entity.headerId; |
||||||
|
data['state'] = entity.state; |
||||||
|
data['reviewerTime'] = entity.reviewerTime; |
||||||
|
data['reviewerBy'] = entity.reviewerBy; |
||||||
|
data['ossUrl'] = entity.ossUrl; |
||||||
|
data['reason'] = entity.reason; |
||||||
|
data['isDelete'] = entity.isDelete; |
||||||
|
data['invoiceHeaderName'] = entity.invoiceHeaderName; |
||||||
|
data['invoiceHeaderCode'] = entity.invoiceHeaderCode; |
||||||
|
data['orderList'] = entity.orderList; |
||||||
|
data['headertype'] = entity.headertype; |
||||||
|
data['companyAddr'] = entity.companyAddr; |
||||||
|
data['companyPhone'] = entity.companyPhone; |
||||||
|
data['bank'] = entity.bank; |
||||||
|
data['bankNumber'] = entity.bankNumber; |
||||||
|
return data; |
||||||
|
} |
||||||
|
|
||||||
|
extension InvoicesHistoryListRecordsExtension on InvoicesHistoryListRecords { |
||||||
|
InvoicesHistoryListRecords copyWith({ |
||||||
|
String? id, |
||||||
|
String? createTime, |
||||||
|
String? createUser, |
||||||
|
String? updateTime, |
||||||
|
String? updateUser, |
||||||
|
String? phone, |
||||||
|
String? receivingPhone, |
||||||
|
String? mid, |
||||||
|
List<String>? orderIds, |
||||||
|
String? money, |
||||||
|
String? type, |
||||||
|
String? headerId, |
||||||
|
String? state, |
||||||
|
dynamic reviewerTime, |
||||||
|
String? reviewerBy, |
||||||
|
dynamic ossUrl, |
||||||
|
String? reason, |
||||||
|
int? isDelete, |
||||||
|
String? invoiceHeaderName, |
||||||
|
String? invoiceHeaderCode, |
||||||
|
dynamic orderList, |
||||||
|
dynamic headertype, |
||||||
|
dynamic companyAddr, |
||||||
|
dynamic companyPhone, |
||||||
|
dynamic bank, |
||||||
|
dynamic bankNumber, |
||||||
|
}) { |
||||||
|
return InvoicesHistoryListRecords() |
||||||
|
..id = id ?? this.id |
||||||
|
..createTime = createTime ?? this.createTime |
||||||
|
..createUser = createUser ?? this.createUser |
||||||
|
..updateTime = updateTime ?? this.updateTime |
||||||
|
..updateUser = updateUser ?? this.updateUser |
||||||
|
..phone = phone ?? this.phone |
||||||
|
..receivingPhone = receivingPhone ?? this.receivingPhone |
||||||
|
..mid = mid ?? this.mid |
||||||
|
..orderIds = orderIds ?? this.orderIds |
||||||
|
..money = money ?? this.money |
||||||
|
..type = type ?? this.type |
||||||
|
..headerId = headerId ?? this.headerId |
||||||
|
..state = state ?? this.state |
||||||
|
..reviewerTime = reviewerTime ?? this.reviewerTime |
||||||
|
..reviewerBy = reviewerBy ?? this.reviewerBy |
||||||
|
..ossUrl = ossUrl ?? this.ossUrl |
||||||
|
..reason = reason ?? this.reason |
||||||
|
..isDelete = isDelete ?? this.isDelete |
||||||
|
..invoiceHeaderName = invoiceHeaderName ?? this.invoiceHeaderName |
||||||
|
..invoiceHeaderCode = invoiceHeaderCode ?? this.invoiceHeaderCode |
||||||
|
..orderList = orderList ?? this.orderList |
||||||
|
..headertype = headertype ?? this.headertype |
||||||
|
..companyAddr = companyAddr ?? this.companyAddr |
||||||
|
..companyPhone = companyPhone ?? this.companyPhone |
||||||
|
..bank = bank ?? this.bank |
||||||
|
..bankNumber = bankNumber ?? this.bankNumber; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
InvoicesHistoryListOrders $InvoicesHistoryListOrdersFromJson( |
||||||
|
Map<String, dynamic> json) { |
||||||
|
final InvoicesHistoryListOrders invoicesHistoryListOrders = InvoicesHistoryListOrders(); |
||||||
|
final String? column = jsonConvert.convert<String>(json['column']); |
||||||
|
if (column != null) { |
||||||
|
invoicesHistoryListOrders.column = column; |
||||||
|
} |
||||||
|
final bool? asc = jsonConvert.convert<bool>(json['asc']); |
||||||
|
if (asc != null) { |
||||||
|
invoicesHistoryListOrders.asc = asc; |
||||||
|
} |
||||||
|
return invoicesHistoryListOrders; |
||||||
|
} |
||||||
|
|
||||||
|
Map<String, dynamic> $InvoicesHistoryListOrdersToJson( |
||||||
|
InvoicesHistoryListOrders entity) { |
||||||
|
final Map<String, dynamic> data = <String, dynamic>{}; |
||||||
|
data['column'] = entity.column; |
||||||
|
data['asc'] = entity.asc; |
||||||
|
return data; |
||||||
|
} |
||||||
|
|
||||||
|
extension InvoicesHistoryListOrdersExtension on InvoicesHistoryListOrders { |
||||||
|
InvoicesHistoryListOrders copyWith({ |
||||||
|
String? column, |
||||||
|
bool? asc, |
||||||
|
}) { |
||||||
|
return InvoicesHistoryListOrders() |
||||||
|
..column = column ?? this.column |
||||||
|
..asc = asc ?? this.asc; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue