class DetailIOModel {
  int? statusCode;
  Data? data;
  String? message;
  bool? success;

  DetailIOModel({this.statusCode, this.data, this.message, this.success});

  DetailIOModel.fromJson(Map<String, dynamic> json) {
    statusCode = json['statusCode'];
    data = json['data'] != null ? Data.fromJson(json['data']) : null;
    message = json['message'];
    success = json['success'];
  }

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

class Data {
  int? id;
  String? ioId;
  int? investmentTypeXid;
  int? sponsorXid;
  int? ioStatusXid;
  String? investmentNameEnglish;
  String? investmentNameArabic;
  String? descriptionEnglish;
  String? descriptionArabic;
  String? goalAmount;
  String? closingDate;
  String? holdingPeriod;
  String? expectedReturn;
  String? originalValuation;
  String? currentValuation;
  String? iSIN;
  String? investmentDetails;
  String? comment;
  bool? isInvestedAmount;
  String? amountInvested;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;
  Sponsor? sponsor;
  IoStatus? ioStatus;
  InvestmentType? investmentType;
  List<Documents>? documents;
  List<ArtifactsVideo>? artifactsVideo;
  List<ArtifactsImage>? artifactsImage;
  List<MinInvestmentAmt>? minInvestmentAmt;
  List<KeyMerits>? keyMerits;

  Data(
      {this.id,
      this.ioId,
      this.investmentTypeXid,
      this.sponsorXid,
      this.ioStatusXid,
      this.investmentNameEnglish,
      this.investmentNameArabic,
      this.descriptionEnglish,
      this.descriptionArabic,
      this.goalAmount,
      this.closingDate,
      this.holdingPeriod,
      this.expectedReturn,
      this.originalValuation,
      this.currentValuation,
      this.iSIN,
      this.investmentDetails,
      this.comment,
      this.isInvestedAmount,
      this.amountInvested,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt,
      this.sponsor,
      this.ioStatus,
      this.investmentType,
      this.documents,
      this.artifactsVideo,
      this.artifactsImage,
      this.minInvestmentAmt,
      this.keyMerits});

  Data.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    ioId = json['io_id'];
    investmentTypeXid = json['investmentType_xid'];
    sponsorXid = json['sponsor_xid'];
    ioStatusXid = json['ioStatus_xid'];
    investmentNameEnglish = json['investmentNameEnglish'];
    investmentNameArabic = json['investmentNameArabic'];
    descriptionEnglish = json['descriptionEnglish'];
    descriptionArabic = json['descriptionArabic'];
    goalAmount = json['goalAmount'];
    closingDate = json['closingDate'];
    holdingPeriod = json['holdingPeriod'];
    expectedReturn = json['expectedReturn'];
    originalValuation = json['originalValuation'];
    currentValuation = json['currentValuation'];
    iSIN = json['ISIN'];
    investmentDetails = json['InvestmentDetails'];
    comment = json['comment'];
    isInvestedAmount = json['isInvestedAmount'];
    amountInvested = json['amountInvested'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
    sponsor =
        json['sponsor'] != null ? Sponsor.fromJson(json['sponsor']) : null;
    ioStatus =
        json['ioStatus'] != null ? IoStatus.fromJson(json['ioStatus']) : null;
    investmentType = json['investmentType'] != null
        ? InvestmentType.fromJson(json['investmentType'])
        : null;
    if (json['documents'] != null) {
      documents = <Documents>[];
      json['documents'].forEach((v) {
        documents!.add(Documents.fromJson(v));
      });
    }
    if (json['artifactsVideo'] != null) {
      artifactsVideo = <ArtifactsVideo>[];
      json['artifactsVideo'].forEach((v) {
        artifactsVideo!.add(ArtifactsVideo.fromJson(v));
      });
    }
    if (json['artifactsImage'] != null) {
      artifactsImage = <ArtifactsImage>[];
      json['artifactsImage'].forEach((v) {
        artifactsImage!.add(ArtifactsImage.fromJson(v));
      });
    }
    if (json['minInvestmentAmt'] != null) {
      minInvestmentAmt = <MinInvestmentAmt>[];
      json['minInvestmentAmt'].forEach((v) {
        minInvestmentAmt!.add(MinInvestmentAmt.fromJson(v));
      });
    }
    if (json['keyMerits'] != null) {
      keyMerits = <KeyMerits>[];
      json['keyMerits'].forEach((v) {
        keyMerits!.add(KeyMerits.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['io_id'] = ioId;
    data['investmentType_xid'] = investmentTypeXid;
    data['sponsor_xid'] = sponsorXid;
    data['ioStatus_xid'] = ioStatusXid;
    data['investmentNameEnglish'] = investmentNameEnglish;
    data['investmentNameArabic'] = investmentNameArabic;
    data['descriptionEnglish'] = descriptionEnglish;
    data['descriptionArabic'] = descriptionArabic;
    data['goalAmount'] = goalAmount;
    data['closingDate'] = closingDate;
    data['holdingPeriod'] = holdingPeriod;
    data['expectedReturn'] = expectedReturn;
    data['originalValuation'] = originalValuation;
    data['currentValuation'] = currentValuation;
    data['ISIN'] = iSIN;
    data['InvestmentDetails'] = investmentDetails;
    data['comment'] = comment;
    data['isInvestedAmount'] = isInvestedAmount;
    data['amountInvested'] = amountInvested;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    if (sponsor != null) {
      data['sponsor'] = sponsor!.toJson();
    }
    if (ioStatus != null) {
      data['ioStatus'] = ioStatus!.toJson();
    }
    if (investmentType != null) {
      data['investmentType'] = investmentType!.toJson();
    }
    if (documents != null) {
      data['documents'] = documents!.map((v) => v.toJson()).toList();
    }
    if (artifactsVideo != null) {
      data['artifactsVideo'] = artifactsVideo!.map((v) => v.toJson()).toList();
    }
    if (artifactsImage != null) {
      data['artifactsImage'] = artifactsImage!.map((v) => v.toJson()).toList();
    }
    if (minInvestmentAmt != null) {
      data['minInvestmentAmt'] =
          minInvestmentAmt!.map((v) => v.toJson()).toList();
    }
    if (keyMerits != null) {
      data['keyMerits'] = keyMerits!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Sponsor {
  int? id;
  String? sponsorName;
  String? sponsorNameArabic;
  String? email;
  Null profile;
  Null address;
  Null mobileNo;
  Null bankName;
  Null accountNumber;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  Sponsor(
      {this.id,
      this.sponsorName,
      this.sponsorNameArabic,
      this.email,
      this.profile,
      this.address,
      this.mobileNo,
      this.bankName,
      this.accountNumber,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  Sponsor.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    sponsorName = json['sponsorName'];
    sponsorNameArabic = json['sponsorNameArabic'];
    email = json['email'];
    profile = json['profile'];
    address = json['address'];
    mobileNo = json['mobileNo'];
    bankName = json['bankName'];
    accountNumber = json['accountNumber'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['sponsorName'] = sponsorName;
    data['sponsorNameArabic'] = sponsorNameArabic;
    data['email'] = email;
    data['profile'] = profile;
    data['address'] = address;
    data['mobileNo'] = mobileNo;
    data['bankName'] = bankName;
    data['accountNumber'] = accountNumber;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}

class IoStatus {
  int? id;
  String? statusAdmin;
  String? statusInvest;
  String? statusPortfolio;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  IoStatus(
      {this.id,
      this.statusAdmin,
      this.statusInvest,
      this.statusPortfolio,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  IoStatus.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    statusAdmin = json['statusAdmin'];
    statusInvest = json['statusInvest'];
    statusPortfolio = json['statusPortfolio'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['statusAdmin'] = statusAdmin;
    data['statusInvest'] = statusInvest;
    data['statusPortfolio'] = statusPortfolio;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}

class InvestmentType {
  int? id;
  String? investmentTypeName;
  String? investmentTypeNameArabic;
  String? note;
  String? noteArabic;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  InvestmentType(
      {this.id,
      this.investmentTypeName,
      this.investmentTypeNameArabic,
      this.note,
      this.noteArabic,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  InvestmentType.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    investmentTypeName = json['investmentTypeName'];
    investmentTypeNameArabic = json['investmentTypeNameArabic'];
    note = json['note'];
    noteArabic = json['noteArabic'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['investmentTypeName'] = investmentTypeName;
    data['investmentTypeNameArabic'] = investmentTypeNameArabic;
    data['note'] = note;
    data['noteArabic'] = noteArabic;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}

class Documents {
  int? id;
  int? ioXid;
  String? documentType;
  String? documentName;
  String? documentPath;
  int? displayOrder;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  Documents(
      {this.id,
      this.ioXid,
      this.documentType,
      this.documentName,
      this.documentPath,
      this.displayOrder,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  Documents.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    ioXid = json['io_xid'];
    documentType = json['documentType'];
    documentName = json['documentName'];
    documentPath = json['documentPath'];
    displayOrder = json['displayOrder'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['io_xid'] = ioXid;
    data['documentType'] = documentType;
    data['documentName'] = documentName;
    data['documentPath'] = documentPath;
    data['displayOrder'] = displayOrder;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}

class ArtifactsVideo {
  int? id;
  int? ioXid;
  String? artifactName;
  String? artifactStreamingURL;
  int? displayOrder;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  ArtifactsVideo(
      {this.id,
      this.ioXid,
      this.artifactName,
      this.artifactStreamingURL,
      this.displayOrder,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  ArtifactsVideo.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    ioXid = json['io_xid'];
    artifactName = json['artifactName'];
    artifactStreamingURL = json['artifactStreamingURL'];
    displayOrder = json['displayOrder'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['io_xid'] = ioXid;
    data['artifactName'] = artifactName;
    data['artifactStreamingURL'] = artifactStreamingURL;
    data['displayOrder'] = displayOrder;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}

class ArtifactsImage {
  int? id;
  int? ioXid;
  String? artifactName;
  String? artifactPathName;
  int? displayOrder;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  ArtifactsImage(
      {this.id,
      this.ioXid,
      this.artifactName,
      this.artifactPathName,
      this.displayOrder,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  ArtifactsImage.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    ioXid = json['io_xid'];
    artifactName = json['artifactName'];
    artifactPathName = json['artifactPathName'];
    displayOrder = json['displayOrder'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['io_xid'] = ioXid;
    data['artifactName'] = artifactName;
    data['artifactPathName'] = artifactPathName;
    data['displayOrder'] = displayOrder;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}

class MinInvestmentAmt {
  int? id;
  int? ioXid;
  int? countryXid;
  String? minInvestmentAmt;
  String? maxInvestmentAmt;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  MinInvestmentAmt(
      {this.id,
      this.ioXid,
      this.countryXid,
      this.minInvestmentAmt,
      this.maxInvestmentAmt,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  MinInvestmentAmt.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    ioXid = json['io_xid'];
    countryXid = json['country_xid'];
    minInvestmentAmt = json['minInvestmentAmt'];
    maxInvestmentAmt = json['maxInvestmentAmt'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['io_xid'] = ioXid;
    data['country_xid'] = countryXid;
    data['minInvestmentAmt'] = minInvestmentAmt;
    data['maxInvestmentAmt'] = maxInvestmentAmt;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}

class KeyMerits {
  int? id;
  int? ioXid;
  int? iconXid;
  String? meritsHeader;
  String? meritsHeaderArabic;
  String? meritsDescription;
  String? meritsDescriptionArabic;
  int? displayOrder;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;
  Icon? icon;

  KeyMerits(
      {this.id,
      this.ioXid,
      this.iconXid,
      this.meritsHeader,
      this.meritsHeaderArabic,
      this.meritsDescription,
      this.meritsDescriptionArabic,
      this.displayOrder,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt,
      this.icon});

  KeyMerits.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    ioXid = json['io_xid'];
    iconXid = json['icon_xid'];
    meritsHeader = json['meritsHeader'];
    meritsHeaderArabic = json['meritsHeaderArabic'];
    meritsDescription = json['meritsDescription'];
    meritsDescriptionArabic = json['meritsDescriptionArabic'];
    displayOrder = json['displayOrder'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
    icon = json['icon'] != null ? Icon.fromJson(json['icon']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['io_xid'] = ioXid;
    data['icon_xid'] = iconXid;
    data['meritsHeader'] = meritsHeader;
    data['meritsHeaderArabic'] = meritsHeaderArabic;
    data['meritsDescription'] = meritsDescription;
    data['meritsDescriptionArabic'] = meritsDescriptionArabic;
    data['displayOrder'] = displayOrder;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    if (icon != null) {
      data['icon'] = icon!.toJson();
    }
    return data;
  }
}

class Icon {
  int? id;
  String? iconName;
  String? iconFilePath;
  bool? isActive;
  Null createdBy;
  Null modifiedBy;
  String? createdAt;
  String? updatedAt;
  Null deletedAt;

  Icon(
      {this.id,
      this.iconName,
      this.iconFilePath,
      this.isActive,
      this.createdBy,
      this.modifiedBy,
      this.createdAt,
      this.updatedAt,
      this.deletedAt});

  Icon.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    iconName = json['iconName'];
    iconFilePath = json['iconFilePath'];
    isActive = json['isActive'];
    createdBy = json['createdBy'];
    modifiedBy = json['modifiedBy'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    deletedAt = json['deletedAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['iconName'] = iconName;
    data['iconFilePath'] = iconFilePath;
    data['isActive'] = isActive;
    data['createdBy'] = createdBy;
    data['modifiedBy'] = modifiedBy;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['deletedAt'] = deletedAt;
    return data;
  }
}
