You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

232 lines
6.0 KiB

/// records : [{"id":"1701507861319778304","createTime":"2023-09-12 16:07:41","createUser":"1640233401329909760","updateTime":"2023-09-12 16:07:41","updateUser":"1640233401329909760","storeId":"0","type":3,"reason":"测试退款","isDelete":0},{"id":"1689577561031442432","createTime":"2023-08-10 18:00:56","createUser":"1640233401329909760","updateTime":"2023-08-10 18:01:09","updateUser":"1640233401329909760","storeId":"1645316356192600064","type":3,"reason":"错误下单","isDelete":0},{"id":"1685119824058908672","createTime":"2023-07-29 10:47:29","createUser":"1640233401329909760","updateTime":"2023-07-29 10:47:29","updateUser":"1640233401329909760","storeId":"0","type":3,"reason":"客户取消","isDelete":0}]
/// total : "3"
/// size : "999"
/// current : "1"
/// orders : [{"column":"id","asc":false}]
/// hitCount : false
/// searchCount : true
/// pages : "1"
class RefundReasonList {
RefundReasonList({
List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,}){
_records = records;
_total = total;
_size = size;
_current = current;
_orders = orders;
_hitCount = hitCount;
_searchCount = searchCount;
_pages = pages;
}
RefundReasonList.fromJson(dynamic json) {
if (json['records'] != null) {
_records = [];
json['records'].forEach((v) {
_records.add(Records.fromJson(v));
});
}
_total = json['total'];
_size = json['size'];
_current = json['current'];
if (json['orders'] != null) {
_orders = [];
json['orders'].forEach((v) {
_orders.add(Orders.fromJson(v));
});
}
_hitCount = json['hitCount'];
_searchCount = json['searchCount'];
_pages = json['pages'];
}
List<Records> _records;
String _total;
String _size;
String _current;
List<Orders> _orders;
bool _hitCount;
bool _searchCount;
String _pages;
RefundReasonList copyWith({ List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,
}) => RefundReasonList( records: records ?? _records,
total: total ?? _total,
size: size ?? _size,
current: current ?? _current,
orders: orders ?? _orders,
hitCount: hitCount ?? _hitCount,
searchCount: searchCount ?? _searchCount,
pages: pages ?? _pages,
);
List<Records> get records => _records;
String get total => _total;
String get size => _size;
String get current => _current;
List<Orders> get orders => _orders;
bool get hitCount => _hitCount;
bool get searchCount => _searchCount;
String get pages => _pages;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_records != null) {
map['records'] = _records.map((v) => v.toJson()).toList();
}
map['total'] = _total;
map['size'] = _size;
map['current'] = _current;
if (_orders != null) {
map['orders'] = _orders.map((v) => v.toJson()).toList();
}
map['hitCount'] = _hitCount;
map['searchCount'] = _searchCount;
map['pages'] = _pages;
return map;
}
}
/// column : "id"
/// asc : false
class Orders {
Orders({
String column,
bool asc,}){
_column = column;
_asc = asc;
}
Orders.fromJson(dynamic json) {
_column = json['column'];
_asc = json['asc'];
}
String _column;
bool _asc;
Orders copyWith({ String column,
bool asc,
}) => Orders( column: column ?? _column,
asc: asc ?? _asc,
);
String get column => _column;
bool get asc => _asc;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['column'] = _column;
map['asc'] = _asc;
return map;
}
}
/// id : "1701507861319778304"
/// createTime : "2023-09-12 16:07:41"
/// createUser : "1640233401329909760"
/// updateTime : "2023-09-12 16:07:41"
/// updateUser : "1640233401329909760"
/// storeId : "0"
/// type : 3
/// reason : "测试退款"
/// isDelete : 0
class Records {
Records({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
num type,
String reason,
num isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_reason = reason;
_isDelete = isDelete;
}
Records.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_reason = json['reason'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
num _type;
String _reason;
num _isDelete;
Records copyWith({ String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
num type,
String reason,
num isDelete,
}) => Records( id: id ?? _id,
createTime: createTime ?? _createTime,
createUser: createUser ?? _createUser,
updateTime: updateTime ?? _updateTime,
updateUser: updateUser ?? _updateUser,
storeId: storeId ?? _storeId,
type: type ?? _type,
reason: reason ?? _reason,
isDelete: isDelete ?? _isDelete,
);
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
num get type => _type;
String get reason => _reason;
num get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['type'] = _type;
map['reason'] = _reason;
map['isDelete'] = _isDelete;
return map;
}
}