Feat: order info page
This commit is contained in:
@@ -148,3 +148,156 @@ class GymCategory {
|
||||
"name": name,
|
||||
};
|
||||
}
|
||||
|
||||
class GymHistoryItem {
|
||||
final String id;
|
||||
final String date;
|
||||
final String sum;
|
||||
final String photo;
|
||||
|
||||
GymHistoryItem({
|
||||
required this.id,
|
||||
required this.date,
|
||||
required this.sum,
|
||||
required this.photo,
|
||||
});
|
||||
|
||||
factory GymHistoryItem.fromRawJson(String str) =>
|
||||
GymHistoryItem.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory GymHistoryItem.fromJson(Map<String, dynamic> json) => GymHistoryItem(
|
||||
id: json["id"],
|
||||
date: json["date"],
|
||||
sum: json["sum"],
|
||||
photo: json["photo"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"date": date,
|
||||
"sum": sum,
|
||||
"photo": photo,
|
||||
};
|
||||
}
|
||||
|
||||
class GymHistoryItemDetail {
|
||||
final String id;
|
||||
final String date;
|
||||
final String sum;
|
||||
final String payUrl;
|
||||
final String receiver;
|
||||
final String email;
|
||||
final String address;
|
||||
final List<GymHistoryItemDetailProvider> providers;
|
||||
|
||||
GymHistoryItemDetail({
|
||||
required this.id,
|
||||
required this.date,
|
||||
required this.sum,
|
||||
required this.payUrl,
|
||||
required this.providers,
|
||||
required this.receiver,
|
||||
required this.email,
|
||||
required this.address,
|
||||
});
|
||||
|
||||
factory GymHistoryItemDetail.fromRawJson(String str) =>
|
||||
GymHistoryItemDetail.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory GymHistoryItemDetail.fromJson(Map<String, dynamic> json) =>
|
||||
GymHistoryItemDetail(
|
||||
id: json["id"],
|
||||
date: json["date"],
|
||||
sum: json["sum"],
|
||||
receiver: json["receiver"],
|
||||
email: json["email"],
|
||||
address: json["address"],
|
||||
payUrl: json["pay_url"],
|
||||
providers: List<GymHistoryItemDetailProvider>.from(json["providers"]
|
||||
.map((x) => GymHistoryItemDetailProvider.fromJson(x))),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"date": date,
|
||||
"sum": sum,
|
||||
"pay_url": payUrl,
|
||||
"providers": List<dynamic>.from(providers.map((x) => x.toJson())),
|
||||
"receiver": receiver,
|
||||
"email": email,
|
||||
"address": address,
|
||||
};
|
||||
}
|
||||
|
||||
class GymHistoryItemDetailProvider {
|
||||
final String id;
|
||||
final String name;
|
||||
final String status;
|
||||
final List<GymHistoryItemDetailItem> items;
|
||||
|
||||
GymHistoryItemDetailProvider({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.status,
|
||||
required this.items,
|
||||
});
|
||||
|
||||
factory GymHistoryItemDetailProvider.fromRawJson(String str) =>
|
||||
GymHistoryItemDetailProvider.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory GymHistoryItemDetailProvider.fromJson(Map<String, dynamic> json) =>
|
||||
GymHistoryItemDetailProvider(
|
||||
id: json["id"],
|
||||
name: json["name"],
|
||||
status: json["status"],
|
||||
items: List<GymHistoryItemDetailItem>.from(
|
||||
json["items"].map((x) => GymHistoryItemDetailItem.fromJson(x))),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"name": name,
|
||||
"status": status,
|
||||
"items": List<dynamic>.from(items.map((x) => x.toJson())),
|
||||
};
|
||||
}
|
||||
|
||||
class GymHistoryItemDetailItem {
|
||||
final String photo;
|
||||
final String id;
|
||||
final int count;
|
||||
final String price;
|
||||
|
||||
GymHistoryItemDetailItem({
|
||||
required this.photo,
|
||||
required this.id,
|
||||
required this.count,
|
||||
required this.price,
|
||||
});
|
||||
|
||||
factory GymHistoryItemDetailItem.fromRawJson(String str) =>
|
||||
GymHistoryItemDetailItem.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
factory GymHistoryItemDetailItem.fromJson(Map<String, dynamic> json) =>
|
||||
GymHistoryItemDetailItem(
|
||||
photo: json["photo"],
|
||||
id: json["id"],
|
||||
count: json["count"],
|
||||
price: json["price"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"photo": photo,
|
||||
"id": id,
|
||||
"count": count,
|
||||
"price": price,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user