class CMCInsertPresOrderRequestModel {
  double versionID;
  int channel;
  int languageID;
  String iPAdress;
  String generalid;
  int patientOutSA;
  String sessionID;
  bool isDentalAllowedBackend;
  int deviceTypeID;
  int patientID;
  String tokenID;
  int patientTypeID;
  int patientType;
  double latitude;
  double longitude;
  int createdBy;
  int orderServiceID;
  List<PatientERCMCInsertServicesList> patientERCMCInsertServicesList;

  CMCInsertPresOrderRequestModel(
      {this.versionID,
        this.channel,
        this.languageID,
        this.iPAdress,
        this.generalid,
        this.patientOutSA,
        this.sessionID,
        this.isDentalAllowedBackend,
        this.deviceTypeID,
        this.patientID,
        this.tokenID,
        this.patientTypeID,
        this.patientType,
        this.latitude,
        this.longitude,
        this.createdBy,
        this.orderServiceID,
        this.patientERCMCInsertServicesList});

  CMCInsertPresOrderRequestModel.fromJson(Map<String, dynamic> json) {
    versionID = json['VersionID'];
    channel = json['Channel'];
    languageID = json['LanguageID'];
    iPAdress = json['IPAdress'];
    generalid = json['generalid'];
    patientOutSA = json['PatientOutSA'];
    sessionID = json['SessionID'];
    isDentalAllowedBackend = json['isDentalAllowedBackend'];
    deviceTypeID = json['DeviceTypeID'];
    patientID = json['PatientID'];
    tokenID = json['TokenID'];
    patientTypeID = json['PatientTypeID'];
    patientType = json['PatientType'];
    latitude = json['Latitude'];
    longitude = json['Longitude'];
    createdBy = json['CreatedBy'];
    orderServiceID = json['OrderServiceID'];
    if (json['PatientER_CMC_InsertServicesList'] != null) {
      patientERCMCInsertServicesList =
      new List<PatientERCMCInsertServicesList>();
      json['PatientER_CMC_InsertServicesList'].forEach((v) {
        patientERCMCInsertServicesList
            .add(new PatientERCMCInsertServicesList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['VersionID'] = this.versionID;
    data['Channel'] = this.channel;
    data['LanguageID'] = this.languageID;
    data['IPAdress'] = this.iPAdress;
    data['generalid'] = this.generalid;
    data['PatientOutSA'] = this.patientOutSA;
    data['SessionID'] = this.sessionID;
    data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
    data['DeviceTypeID'] = this.deviceTypeID;
    data['PatientID'] = this.patientID;
    data['TokenID'] = this.tokenID;
    data['PatientTypeID'] = this.patientTypeID;
    data['PatientType'] = this.patientType;
    data['Latitude'] = this.latitude;
    data['Longitude'] = this.longitude;
    data['CreatedBy'] = this.createdBy;
    data['OrderServiceID'] = this.orderServiceID;
    if (this.patientERCMCInsertServicesList != null) {
      data['PatientER_CMC_InsertServicesList'] =
          this.patientERCMCInsertServicesList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class PatientERCMCInsertServicesList {
  int recordID;
  String serviceID;
  String selectedServiceName;
  String selectedServiceNameAR;
  dynamic price;
  dynamic vAT;
  dynamic totalPrice;

  PatientERCMCInsertServicesList(
      {this.recordID,
        this.serviceID,
        this.selectedServiceName,
        this.selectedServiceNameAR,
        this.price,
        this.vAT,
        this.totalPrice});

  PatientERCMCInsertServicesList.fromJson(Map<String, dynamic> json) {
    recordID = json['RecordID'];
    serviceID = json['ServiceID'];
    selectedServiceName = json['selectedServiceName'];
    selectedServiceNameAR = json['selectedServiceNameAR'];
    price = json['Price'];
    vAT = json['VAT'];
    totalPrice = json['TotalPrice'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['RecordID'] = this.recordID;
    data['ServiceID'] = this.serviceID;
    data['selectedServiceName'] = this.selectedServiceName;
    data['selectedServiceNameAR'] = this.selectedServiceNameAR;
    data['Price'] = this.price;
    data['VAT'] = this.vAT;
    data['TotalPrice'] = this.totalPrice;
    return data;
  }
}
