import 'PatientERHHCInsertServicesList.dart';

class PatientERInsertPresOrderRequestModel {
  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<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = List();

  PatientERInsertPresOrderRequestModel(
      {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.patientERHHCInsertServicesList
         });

  PatientERInsertPresOrderRequestModel.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_HHC_InsertServicesList'] != null) {
      patientERHHCInsertServicesList =
      new List<PatientERHHCInsertServicesList>();
      json['PatientER_HHC_InsertServicesList'].forEach((v) {
        patientERHHCInsertServicesList
            .add(new PatientERHHCInsertServicesList.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.patientERHHCInsertServicesList != null) {
      data['PatientER_HHC_InsertServicesList'] =
          this.patientERHHCInsertServicesList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
