ProviderReviews

mail@pastecode.io avatar
unknown
dart
2 years ago
2.4 kB
1
Indexable
Never
class ProviderReviews {
  bool? succeeded;
  Data? data;

  ProviderReviews({this.succeeded, this.data});

  ProviderReviews.fromJson(Map<String, dynamic> json) {
    succeeded = json['succeeded'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['succeeded'] = this.succeeded;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    return data;
  }
}

class Data {
  int? totalCount;
  List<Items>? items;

  Data({this.totalCount, this.items});

  Data.fromJson(Map<String, dynamic> json) {
    totalCount = json['totalCount'];
    if (json['items'] != null) {
      items = <Items>[];
      json['items'].forEach((v) {
        items!.add(new Items.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['totalCount'] = this.totalCount;
    if (this.items != null) {
      data['items'] = this.items!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Items {
  String? id;
  String? providerId;
  String? requesterId;
  String? requestServiceId;
  String? requesterName;
  String? requesterUrl;
  double? reviewValue;
  String? reviewDescription;

  Items(
      {this.id,
      this.providerId,
      this.requesterId,
      this.requestServiceId,
      this.requesterName,
      this.requesterUrl,
      this.reviewValue,
      this.reviewDescription});

  Items.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    providerId = json['providerId'];
    requesterId = json['requesterId'];
    requestServiceId = json['requestServiceId'];
    requesterName = json['requesterName'];
    requesterUrl = json['requesterUrl'];
    reviewValue = json['reviewValue'];
    reviewDescription = json['reviewDescription'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['providerId'] = this.providerId;
    data['requesterId'] = this.requesterId;
    data['requestServiceId'] = this.requestServiceId;
    data['requesterName'] = this.requesterName;
    data['requesterUrl'] = this.requesterUrl;
    data['reviewValue'] = this.reviewValue;
    data['reviewDescription'] = this.reviewDescription;
    return data;
  }
}