12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- import 'package:domain/generated/json/base/json_field.dart';
- import 'package:domain/generated/json/repair_service_entity.g.dart';
- import 'dart:convert';
- export 'package:domain/generated/json/repair_service_entity.g.dart';
- @JsonSerializable()
- class RepairServiceEntity {
- int? count;
- int? page;
- int? limit;
- @JSONField(name: "count_page")
- int? countPage;
- List<RepairServiceList>? list;
- RepairServiceEntity();
- factory RepairServiceEntity.fromJson(Map<String, dynamic> json) => $RepairServiceEntityFromJson(json);
- Map<String, dynamic> toJson() => $RepairServiceEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RepairServiceList {
- int? id;
- String? name;
- @JSONField(name: "likes_count")
- int? likesCount;
- bool? liked;
- RepairServiceListMerchant? merchant;
- RepairServiceListCategory? category;
- RepairServiceList();
- factory RepairServiceList.fromJson(Map<String, dynamic> json) => $RepairServiceListFromJson(json);
- Map<String, dynamic> toJson() => $RepairServiceListToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RepairServiceListMerchant {
- int? id;
- String? name;
- RepairServiceListMerchant();
- factory RepairServiceListMerchant.fromJson(Map<String, dynamic> json) => $RepairServiceListMerchantFromJson(json);
- Map<String, dynamic> toJson() => $RepairServiceListMerchantToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RepairServiceListCategory {
- int? id;
- String? name;
- String? type;
- RepairServiceListCategory();
- factory RepairServiceListCategory.fromJson(Map<String, dynamic> json) => $RepairServiceListCategoryFromJson(json);
- Map<String, dynamic> toJson() => $RepairServiceListCategoryToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|