Untitled

mail@pastecode.io avatar
unknown
dart
2 years ago
11 kB
2
Indexable
Never
import 'package:iketfaa_delivery/App/Common/Models/Main/Payments.dart';
import 'package:iketfaa_delivery/App/Common/Models/Main/address.dart';

class BusinessServiceItems {
  String? providerId;
  String? providerName;
  String? providerUserName;
  double? rating;
  String? providerMobileNo;
  String? requesterId;
  String? requesterName;
  String? requesterUserName;
  String? requesterMobileNo;
  int? specialityId;
  String? specialityNameAr;
  String? specialityNameEn;
  String? specialityUrl;
  String? providerSpecialityId;
  Address? requesterAddress;
  Address? providerAddress;
  List<Payments>? payments;
  String? description;
  double? bid;
  double? budget;
  int? status;
  int? decisionType;
  int? paymentType;
  String? paymentTypeNameAr;
  String? paymentTypeNameEn;
  String? fromUser;
  String? fromUserUrl;
  String? toUser;
  String? toUserUrl;
  bool? isVerified;
  String? invoiceLink;
  String? schedulerDate;
  String? invoiceId1;
  String? invoiceId2;
  String? paymentLink1;
  String? paymentLink2;
  String? invoice1Status;
  String? invoice2Status;
  int? reasonId;
  String? reason;
  String? reasonProvider;
  String? reasonRequester;
  int? reasonIdProvider;
  int? reasonIdRequester;
  dynamic reasonIdProviderAr;
  dynamic reasonIdProviderEn;
  String? reasonIdRequesterAr;
  String? reasonIdRequesterEn;
  bool? onTime;
  String? offerId;
  int? offerStatus;
  List<Documents>? documents;
  String? createdDate;
  String? createdBy;
  String? modifiedDate;
  String? modifiedBy;
  bool? requesterConfirm, providerConfirm;
  String? id;
  int? paymentMethod;
  String? expectedDeliveryDate;
  BusinessServiceItems(
      {this.providerId,
      this.expectedDeliveryDate,
      this.providerName,
      this.providerUserName,
      this.rating,
      this.providerMobileNo,
      this.requesterId,
      this.requesterName,
      this.paymentMethod,
      this.requesterUserName,
      this.requesterMobileNo,
      this.specialityId,
      this.specialityNameAr,
      this.specialityNameEn,
      this.specialityUrl,
      this.providerSpecialityId,
      this.requesterAddress,
      this.providerAddress,
      this.payments,
      this.description,
      this.bid,
      this.budget,
      this.status,
      this.decisionType,
      this.paymentType,
      this.paymentTypeNameAr,
      this.paymentTypeNameEn,
      this.fromUser,
      this.fromUserUrl,
      this.toUser,
      this.toUserUrl,
      this.isVerified,
      this.invoiceLink,
      this.schedulerDate,
      this.invoiceId1,
      this.invoiceId2,
      this.paymentLink1,
      this.paymentLink2,
      this.invoice1Status,
      this.invoice2Status,
      this.reasonId,
      this.reason,
      this.reasonProvider,
      this.reasonRequester,
      this.reasonIdProvider,
      this.reasonIdRequester,
      this.reasonIdProviderAr,
      this.reasonIdProviderEn,
      this.reasonIdRequesterAr,
      this.reasonIdRequesterEn,
      this.onTime,
      this.offerId,
      this.offerStatus,
      this.documents,
      this.createdDate,
      this.createdBy,
      this.modifiedDate,
      this.modifiedBy,
      this.requesterConfirm,
      this.providerConfirm,
      this.id});

  BusinessServiceItems.fromJson(Map<String, dynamic> json) {
    paymentMethod = json['paymentMethod'];
    providerId = json['providerId'];
    providerName = json['providerName'];
    providerUserName = json['providerUserName'];
    rating = json['rating'];
    providerMobileNo = json['providerMobileNo'];
    requesterId = json['requesterId'];
    requesterName = json['requesterName'];
    requesterUserName = json['requesterUserName'];
    requesterMobileNo = json['requesterMobileNo'];
    specialityId = json['specialityId'];
    specialityNameAr = json['specialityNameAr'];
    specialityNameEn = json['specialityNameEn'];
    specialityUrl = json['specialityUrl'];
    providerSpecialityId = json['providerSpecialityId'];
    requesterAddress =
        json['address'] != null ? new Address.fromJson(json['address']) : null;
    providerAddress = json['providerAddress'] != null
        ? new Address.fromJson(json['providerAddress'])
        : null;
    if (json['payments'] != null) {
      payments = <Payments>[];
      json['payments'].forEach((v) {
        payments!.add(new Payments.fromJson(v));
      });
    }
    expectedDeliveryDate = json['expectedDeliveryDate'];
    description = json['descr'];
    bid = json['bid'];
    budget = json['budget'];
    status = json['status'];
    decisionType = json['decisionType'];
    paymentType = json['paymentType'];
    paymentTypeNameAr = json['paymentTypeNameAr'];
    paymentTypeNameEn = json['paymentTypeNameEn'];
    fromUser = json['fromUser'];
    fromUserUrl = json['fromUserUrl'];
    toUser = json['toUser'];
    toUserUrl = json['toUserUrl'];
    isVerified = json['isVerified'];
    invoiceLink = json['invoiceLink'];
    schedulerDate = json['schedulerDate'];
    invoiceId1 = json['invoiceId1'];
    invoiceId2 = json['invoiceId2'];
    paymentLink1 = json['paymentLink1'];
    paymentLink2 = json['paymentLink2'];
    invoice1Status = json['invoice1Status'];
    invoice2Status = json['invoice2Status'];
    reasonId = json['reasonId'];
    reason = json['reason'];
    reasonProvider = json['reasonProvider'];
    reasonRequester = json['reasonRequester'];
    reasonIdProvider = json['reasonIdProvider'];
    reasonIdRequester = json['reasonIdRequester'];
    reasonIdProviderAr = json['reasonIdProviderAr'];
    reasonIdProviderEn = json['reasonIdProviderEn'];
    reasonIdRequesterAr = json['reasonIdRequesterAr'];
    reasonIdRequesterEn = json['reasonIdRequesterEn'];
    onTime = json['onTime'];
    offerId = json['offerId'];
    offerStatus = json['offerStatus'];
    if (json['documents'] != null) {
      documents = <Documents>[];
      json['documents'].forEach((v) {
        documents!.add(new Documents.fromJson(v));
      });
    }
    createdDate = json['createdDate'];
    createdBy = json['createdBy'];
    modifiedDate = json['modifiedDate'];
    modifiedBy = json['modifiedBy'];
    requesterConfirm = json['requesterConfirm'];
    providerConfirm = json['providerConfirm'];
    id = json['id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['providerId'] = this.providerId;
    data['providerName'] = this.providerName;
    data['providerUserName'] = this.providerUserName;
    data['rating'] = this.rating;
    data['providerMobileNo'] = this.providerMobileNo;
    data['requesterId'] = this.requesterId;
    data['requesterName'] = this.requesterName;
    data['requesterUserName'] = this.requesterUserName;
    data['requesterMobileNo'] = this.requesterMobileNo;
    data['specialityId'] = this.specialityId;
    data['specialityNameAr'] = this.specialityNameAr;
    data['specialityNameEn'] = this.specialityNameEn;
    data['specialityUrl'] = this.specialityUrl;
    data['providerSpecialityId'] = this.providerSpecialityId;
    if (this.requesterAddress != null) {
      data['address'] = this.requesterAddress!.toJson();
    }
    if (this.providerAddress != null) {
      data['providerAddress'] = this.providerAddress!.toJson();
    }
    if (this.payments != null) {
      data['payments'] = this.payments!.map((v) => v.toJson()).toList();
    }
    data['expectedDeliveryDate'] = this.expectedDeliveryDate;
    data['paymentMethod'] = this.paymentMethod;
    data['descr'] = this.description;
    data['bid'] = this.bid;
    data['budget'] = this.budget;
    data['status'] = this.status;
    data['decisionType'] = this.decisionType;
    data['paymentType'] = this.paymentType;
    data['paymentTypeNameAr'] = this.paymentTypeNameAr;
    data['paymentTypeNameEn'] = this.paymentTypeNameEn;
    data['fromUser'] = this.fromUser;
    data['fromUserUrl'] = this.fromUserUrl;
    data['toUser'] = this.toUser;
    data['toUserUrl'] = this.toUserUrl;
    data['isVerified'] = this.isVerified;
    data['invoiceLink'] = this.invoiceLink;
    data['schedulerDate'] = this.schedulerDate;
    data['invoiceId1'] = this.invoiceId1;
    data['invoiceId2'] = this.invoiceId2;
    data['paymentLink1'] = this.paymentLink1;
    data['paymentLink2'] = this.paymentLink2;
    data['invoice1Status'] = this.invoice1Status;
    data['invoice2Status'] = this.invoice2Status;
    data['reasonId'] = this.reasonId;
    data['reason'] = this.reason;
    data['reasonProvider'] = this.reasonProvider;
    data['reasonRequester'] = this.reasonRequester;
    data['reasonIdProvider'] = this.reasonIdProvider;
    data['reasonIdRequester'] = this.reasonIdRequester;
    data['reasonIdProviderAr'] = this.reasonIdProviderAr;
    data['reasonIdProviderEn'] = this.reasonIdProviderEn;
    data['reasonIdRequesterAr'] = this.reasonIdRequesterAr;
    data['reasonIdRequesterEn'] = this.reasonIdRequesterEn;
    data['onTime'] = this.onTime;
    data['offerId'] = this.offerId;
    data['offerStatus'] = this.offerStatus;
    if (this.documents != null) {
      data['documents'] = this.documents!.map((v) => v.toJson()).toList();
    }
    data['createdDate'] = this.createdDate;
    data['createdBy'] = this.createdBy;
    data['modifiedDate'] = this.modifiedDate;
    data['modifiedBy'] = this.modifiedBy;
    data['requesterConfirm'] = this.requesterConfirm;
    data['providerConfirm'] = this.providerConfirm;
    data['id'] = this.id;
    return data;
  }
}

class Documents {
  String? id;
  String? requestId;
  String? url;
  String? expiryDate;
  String? locationType;
  Null name;
  Null type;
  double? size;
  Null sizeUom;
  Null contentType;
  String? fileId;

  Documents(
      {this.id,
      this.requestId,
      this.url,
      this.expiryDate,
      this.locationType,
      this.name,
      this.type,
      this.size,
      this.sizeUom,
      this.contentType,
      this.fileId});

  Documents.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    requestId = json['requestId'];
    url = json['url'];
    expiryDate = json['expiryDate'];
    locationType = json['locationType'];
    name = json['name'];
    type = json['type'];
    size = json['size'];
    sizeUom = json['sizeUom'];
    contentType = json['contentType'];
    fileId = json['fileId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['requestId'] = this.requestId;
    data['url'] = this.url;
    data['expiryDate'] = this.expiryDate;
    data['locationType'] = this.locationType;
    data['name'] = this.name;
    data['type'] = this.type;
    data['size'] = this.size;
    data['sizeUom'] = this.sizeUom;
    data['contentType'] = this.contentType;
    data['fileId'] = this.fileId;
    return data;
  }
}