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.
90 lines
2.3 KiB
90 lines
2.3 KiB
/// wipedDate : "2023-11-10" |
|
/// infoList : [{"ticketName":"四神汤 ","ticketItemName":"测试规格222","wipedNumber":1},{"ticketName":"四神汤 ","ticketItemName":"测试规格","wipedNumber":1}] |
|
|
|
class TicketStatsList { |
|
TicketStatsList({ |
|
String wipedDate, |
|
List<InfoList> infoList,}){ |
|
_wipedDate = wipedDate; |
|
_infoList = infoList; |
|
} |
|
|
|
TicketStatsList.fromJson(dynamic json) { |
|
_wipedDate = json['wipedDate']; |
|
if (json['infoList'] != null) { |
|
_infoList = []; |
|
json['infoList'].forEach((v) { |
|
_infoList.add(InfoList.fromJson(v)); |
|
}); |
|
} |
|
} |
|
String _wipedDate; |
|
List<InfoList> _infoList; |
|
TicketStatsList copyWith({ String wipedDate, |
|
List<InfoList> infoList, |
|
}) => TicketStatsList( wipedDate: wipedDate ?? _wipedDate, |
|
infoList: infoList ?? _infoList, |
|
); |
|
String get wipedDate => _wipedDate; |
|
List<InfoList> get infoList => _infoList; |
|
|
|
Map<String, dynamic> toJson() { |
|
final map = <String, dynamic>{}; |
|
map['wipedDate'] = _wipedDate; |
|
if (_infoList != null) { |
|
map['infoList'] = _infoList.map((v) => v.toJson()).toList(); |
|
} |
|
return map; |
|
} |
|
|
|
} |
|
|
|
/// ticketName : "四神汤 " |
|
/// ticketItemName : "测试规格222" |
|
/// wipedNumber : 1 |
|
|
|
class InfoList { |
|
InfoList({ |
|
String ticketName, |
|
String ticketItemName, |
|
num wipedNumber,}){ |
|
_ticketName = ticketName; |
|
_ticketItemName = ticketItemName; |
|
_wipedNumber = wipedNumber; |
|
} |
|
|
|
InfoList.fromJson(dynamic json) { |
|
_ticketName = json['ticketName']; |
|
_ticketItemName = json['ticketItemName']; |
|
_wipedNumber = json['wipedNumber']; |
|
} |
|
String _ticketName; |
|
String _ticketItemName; |
|
num _wipedNumber; |
|
String _wipedDate; |
|
InfoList copyWith({ String ticketName, |
|
String ticketItemName, |
|
num wipedNumber, |
|
}) => InfoList( ticketName: ticketName ?? _ticketName, |
|
ticketItemName: ticketItemName ?? _ticketItemName, |
|
wipedNumber: wipedNumber ?? _wipedNumber, |
|
); |
|
String get ticketName => _ticketName; |
|
String get ticketItemName => _ticketItemName; |
|
num get wipedNumber => _wipedNumber; |
|
|
|
String get wipedDate => _wipedDate; |
|
|
|
set wipedDate(String value) { |
|
_wipedDate = value; |
|
} |
|
|
|
Map<String, dynamic> toJson() { |
|
final map = <String, dynamic>{}; |
|
map['ticketName'] = _ticketName; |
|
map['ticketItemName'] = _ticketItemName; |
|
map['wipedNumber'] = _wipedNumber; |
|
return map; |
|
} |
|
|
|
} |