///
/// Code generated by jsonToDartModel https://ashamp.github.io/jsonToDartModel/
///
///

class DetailProductResponse {
/*
{
  "totalRecord": 0,
  "isSuccess": true,
  "errorMesssage": null,
  "Data": {
    "ItemId": 1,
    "ItemCode": "NSP-000001",
    "BaseCategoryId": 6,
    "CategoryId": 0,
    "BrandId": 5,
    "UnitId": 0,
    "MinPrice": 240000,
    "MaxPrice": 560000,
    "VietnameseName": "Bàn Chải Đánh Răng Điện Oral-B Vitality Braun",
    "EnglishName": "Bàn Chải Đánh Răng Điện Oral-B Vitality Braun",
    "VietnameseSlug": "chat-danh-bong-buoc-1-roar",
    "EnglishSlug": "chat-danh-bong-buoc-1-roar",
    "VietnameseShortDescription": null,
    "EnglishShortDescription": null,
    "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
    "VietnameseContent": "<ul>\n\t<li>Removes P1500 sanding marks</li>\n\t<li>Produces a high gloss finish</li>\n\t<li>Easy to clean and wipe the compound</li>\n\t<li>White Paste Compound</li>\n\t<li>New Formulation effective on 420 HS</li>\n</ul>\n",
    "EnglishContent": "<ul>\n\t<li>Removes P1500 sanding marks</li>\n\t<li>Produces a high gloss finish</li>\n\t<li>Easy to clean and wipe the compound</li>\n\t<li>White Paste Compound</li>\n\t<li>New Formulation effective on 420 HS</li>\n</ul>\n",
    "VietnameseOthorContent": null,
    "EnglishOthorContent": null,
    "VietnameseKeyword": null,
    "EnglishKeyword": null,
    "VietnameseDescription": null,
    "EnglishDescription": null,
    "Price": 413000,
    "Length": null,
    "Width": null,
    "Heighth": null,
    "Weight": null,
    "WarrantyTime": null,
    "IsActive": true,
    "IsFeature": false,
    "IsNewest": false,
    "IsBestSell": false,
    "IsFreeShip": false,
    "VoucherExpired": null,
    "IsMixItem": false,
    "SearchKeyword": "ROAR, 511",
    "ItemFilters": [
      {
        "FilterId": 0,
        "ItemId": 0,
        "VietnameseName": "string",
        "EnglishName": "string",
        "Description": "string",
        "VietnameseGroupName": "string",
        "EnglishGroupName": "string"
      }
    ],
    "ItemImages": [
      {
        "ImageId": "6FEE59C2-BBEF-42AE-9D13-9F450953937A",
        "ItemId": 1,
        "VietnameseAlt": null,
        "EnglishAlt": null,
        "VariantCode": null,
        "Src": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg"
      }
    ],
    "Variants": [
      {
        "ItemId": 1,
        "VariantId": 1,
        "VariantCode": "Mẫu mới",
        "Upc": null,
        "FullVariantCode": "P2068",
        "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
        "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
        "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
        "Price": 240000,
        "Length": null,
        "Width": null,
        "Heighth": null,
        "Weight": 1200,
        "ItemCode": null,
        "ItemName": null,
        "UnitCode": null,
        "ShortDescription": null,
        "Slug": null,
        "ItemImage": null,
        "BrandName": null,
        "BrandCode": null,
        "DiscountType": null,
        "DiscountValue": null,
        "DiscountPrice": 0,
        "SubPrice": 240000,
        "PriceFormat": "240,000",
        "SubPriceFormat": "240,000",
        "SubVariant": {
          "ItemId": 1,
          "VariantId": 1,
          "VariantCode": "Mẫu mới",
          "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
          "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
          "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
          "Price": 240000,
          "ItemProduct": {
            "ItemId": 1,
            "VariantId": 1,
            "VariantCode": "Mẫu mới",
            "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
            "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
            "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
            "Price": 240000
          }
        }
      }
    ],
    "ItemReviews": [
      {
        "ReviewId": "1",
        "ItemId": 0,
        "CustomerId": 0,
        "FullName": "Nguyễn Công Ngọc",
        "Email": "congngoc@gmail.com",
        "Publish": true,
        "ReviewDate": "2021-09-16T12:09:48.921Z",
        "ReviewPoint": 0,
        "Comment": "Shop có hàng nữa không ?",
        "ItemName": "string",
        "ReviewHtml": "https://halotravel.vn/wp-content/uploads/2020/07/thach_trangg_101029297_573874646879779_1794923475739360981_n.jpg"
      }
    ],
    "ItemRelates": [
      {
        "ItemId": 0,
        "RelateItemId": 0,
        "VietnameseName": "string"
      }
    ],
    "ItemSpecificationses": [
      {
        "ItemId": 0,
        "VietnameseName": "string",
        "VietnameseValue": "string",
        "VietnameseGroup": "string",
        "EnglishName": "string",
        "EnglishValue": "string",
        "EnglishGroup": "string",
        "SortOrder": 0,
        "Display": true
      }
    ],
    "ItemBoxes": [
      {
        "ItemId": 0,
        "VietnameseValue": "string",
        "EnglishValue": "string",
        "SortOrder": 0
      }
    ],
    "ItemVouchers": [
      {
        "ItemId": 0,
        "VietnameseValue": "string",
        "EnglishValue": "string",
        "SortOrder": 0
      }
    ],
    "SimilarProduct": [
      {
        "IdProduct": 1,
        "VietnameseValue": "Viên Bio Island Lysine Của Úc Cho Trẻ Từ 6 Tuổi Trở Lên, 60 viên",
        "EnglishValue": "Viên Bio Island Lysine Của Úc Cho Trẻ Từ 6 Tuổi Trở Lên, 60 viên",
        "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/09/vien-uong-bio-island-lysine-ho-tro-tre-tang-chieu-cao-uc-59b8f99aeffd7-13092017162546.png",
        "Price": 234500
      }
    ],
    "VariantsArray": null,
    "ReviewCount": 0,
    "ReviewAvgPoint": 0,
    "DiscountType": 0,
    "DiscountValue": 0,
    "UnitCode": null,
    "BrandCode": "ROAR",
    "BrandName": "ROAR",
    "CategoryName": null,
    "BaseCategoryName": "Đánh Bóng - Chăm Sóc Xe",
    "BrandSlug": "roar",
    "ItemCompares": [
      {
        "ItemId": 0,
        "ItemCompareId": 0,
        "VietnameseName": "string"
      }
    ],
    "ItemVideos": [
      {
        "ItemId": 0,
        "VideoId": 0,
        "YoutubeVideoId": "string",
        "VietnameseSlug": "string",
        "EnglishSlug": "string",
        "VietnameseName": "string",
        "EnglishName": "string"
      }
    ],
    "ItemPosts": [
      {
        "ItemId": 0,
        "PostId": 0,
        "Image": "string",
        "VietnameseSlug": "string",
        "EnglishSlug": "string",
        "VietnameseName": "string",
        "EnglishName": "string"
      }
    ],
    "CreateBy": 1,
    "CreateName": null,
    "CreateDate": "2021-08-31T11:39:24.527",
    "LastUpdateDate": null,
    "UpdateName": null,
    "LastUpdateBy": null,
    "RowNumber": 0
  }
}
*/

  int? totalRecord;
  bool? isSuccess;
  String? errorMesssage;
  DetailProductData? Data;

  DetailProductResponse({
    this.totalRecord,
    this.isSuccess,
    this.errorMesssage,
    this.Data,
  });

  DetailProductResponse.fromJson(Map<String, dynamic> json) {
    totalRecord = json["totalRecord"]?.toInt();
    isSuccess = json["isSuccess"];
    errorMesssage = json["errorMesssage"]?.toString();
    Data = (json["Data"] != null) ? DetailProductData.fromJson(json["Data"]) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["totalRecord"] = totalRecord;
    data["isSuccess"] = isSuccess;
    data["errorMesssage"] = errorMesssage;
    if (Data != null) {
      data["Data"] = Data!.toJson();
    }
    return data;
  }
}

class DetailProductData {
/*
{
  "ItemId": 1,
  "ItemCode": "NSP-000001",
  "BaseCategoryId": 6,
  "CategoryId": 0,
  "BrandId": 5,
  "UnitId": 0,
  "MinPrice": 240000,
  "MaxPrice": 560000,
  "VietnameseName": "Bàn Chải Đánh Răng Điện Oral-B Vitality Braun",
  "EnglishName": "Bàn Chải Đánh Răng Điện Oral-B Vitality Braun",
  "VietnameseSlug": "chat-danh-bong-buoc-1-roar",
  "EnglishSlug": "chat-danh-bong-buoc-1-roar",
  "VietnameseShortDescription": null,
  "EnglishShortDescription": null,
  "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
  "VietnameseContent": "<ul>\n\t<li>Removes P1500 sanding marks</li>\n\t<li>Produces a high gloss finish</li>\n\t<li>Easy to clean and wipe the compound</li>\n\t<li>White Paste Compound</li>\n\t<li>New Formulation effective on 420 HS</li>\n</ul>\n",
  "EnglishContent": "<ul>\n\t<li>Removes P1500 sanding marks</li>\n\t<li>Produces a high gloss finish</li>\n\t<li>Easy to clean and wipe the compound</li>\n\t<li>White Paste Compound</li>\n\t<li>New Formulation effective on 420 HS</li>\n</ul>\n",
  "VietnameseOthorContent": null,
  "EnglishOthorContent": null,
  "VietnameseKeyword": null,
  "EnglishKeyword": null,
  "VietnameseDescription": null,
  "EnglishDescription": null,
  "Price": 413000,
  "Length": null,
  "Width": null,
  "Heighth": null,
  "Weight": null,
  "WarrantyTime": null,
  "IsActive": true,
  "IsFeature": false,
  "IsNewest": false,
  "IsBestSell": false,
  "IsFreeShip": false,
  "VoucherExpired": null,
  "IsMixItem": false,
  "SearchKeyword": "ROAR, 511",
  "ItemFilters": [
    {
      "FilterId": 0,
      "ItemId": 0,
      "VietnameseName": "string",
      "EnglishName": "string",
      "Description": "string",
      "VietnameseGroupName": "string",
      "EnglishGroupName": "string"
    }
  ],
  "ItemImages": [
    {
      "ImageId": "6FEE59C2-BBEF-42AE-9D13-9F450953937A",
      "ItemId": 1,
      "VietnameseAlt": null,
      "EnglishAlt": null,
      "VariantCode": null,
      "Src": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg"
    }
  ],
  "Variants": [
    {
      "ItemId": 1,
      "VariantId": 1,
      "VariantCode": "Mẫu mới",
      "Upc": null,
      "FullVariantCode": "P2068",
      "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
      "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
      "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
      "Price": 240000,
      "Length": null,
      "Width": null,
      "Heighth": null,
      "Weight": 1200,
      "ItemCode": null,
      "ItemName": null,
      "UnitCode": null,
      "ShortDescription": null,
      "Slug": null,
      "ItemImage": null,
      "BrandName": null,
      "BrandCode": null,
      "DiscountType": null,
      "DiscountValue": null,
      "DiscountPrice": 0,
      "SubPrice": 240000,
      "PriceFormat": "240,000",
      "SubPriceFormat": "240,000",
      "SubVariant": {
        "ItemId": 1,
        "VariantId": 1,
        "VariantCode": "Mẫu mới",
        "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
        "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
        "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
        "Price": 240000,
        "ItemProduct": {
          "ItemId": 1,
          "VariantId": 1,
          "VariantCode": "Mẫu mới",
          "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
          "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
          "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
          "Price": 240000
        }
      }
    }
  ],
  "ItemReviews": [
    {
      "ReviewId": "1",
      "ItemId": 0,
      "CustomerId": 0,
      "FullName": "Nguyễn Công Ngọc",
      "Email": "congngoc@gmail.com",
      "Publish": true,
      "ReviewDate": "2021-09-16T12:09:48.921Z",
      "ReviewPoint": 0,
      "Comment": "Shop có hàng nữa không ?",
      "ItemName": "string",
      "ReviewHtml": "https://halotravel.vn/wp-content/uploads/2020/07/thach_trangg_101029297_573874646879779_1794923475739360981_n.jpg"
    }
  ],
  "ItemRelates": [
    {
      "ItemId": 0,
      "RelateItemId": 0,
      "VietnameseName": "string"
    }
  ],
  "ItemSpecificationses": [
    {
      "ItemId": 0,
      "VietnameseName": "string",
      "VietnameseValue": "string",
      "VietnameseGroup": "string",
      "EnglishName": "string",
      "EnglishValue": "string",
      "EnglishGroup": "string",
      "SortOrder": 0,
      "Display": true
    }
  ],
  "ItemBoxes": [
    {
      "ItemId": 0,
      "VietnameseValue": "string",
      "EnglishValue": "string",
      "SortOrder": 0
    }
  ],
  "ItemVouchers": [
    {
      "ItemId": 0,
      "VietnameseValue": "string",
      "EnglishValue": "string",
      "SortOrder": 0
    }
  ],
  "SimilarProduct": [
    {
      "IdProduct": 1,
      "VietnameseValue": "Viên Bio Island Lysine Của Úc Cho Trẻ Từ 6 Tuổi Trở Lên, 60 viên",
      "EnglishValue": "Viên Bio Island Lysine Của Úc Cho Trẻ Từ 6 Tuổi Trở Lên, 60 viên",
      "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/09/vien-uong-bio-island-lysine-ho-tro-tre-tang-chieu-cao-uc-59b8f99aeffd7-13092017162546.png",
      "Price": 234500
    }
  ],
  "VariantsArray": null,
  "ReviewCount": 0,
  "ReviewAvgPoint": 0,
  "DiscountType": 0,
  "DiscountValue": 0,
  "UnitCode": null,
  "BrandCode": "ROAR",
  "BrandName": "ROAR",
  "CategoryName": null,
  "BaseCategoryName": "Đánh Bóng - Chăm Sóc Xe",
  "BrandSlug": "roar",
  "ItemCompares": [
    {
      "ItemId": 0,
      "ItemCompareId": 0,
      "VietnameseName": "string"
    }
  ],
  "ItemVideos": [
    {
      "ItemId": 0,
      "VideoId": 0,
      "YoutubeVideoId": "string",
      "VietnameseSlug": "string",
      "EnglishSlug": "string",
      "VietnameseName": "string",
      "EnglishName": "string"
    }
  ],
  "ItemPosts": [
    {
      "ItemId": 0,
      "PostId": 0,
      "Image": "string",
      "VietnameseSlug": "string",
      "EnglishSlug": "string",
      "VietnameseName": "string",
      "EnglishName": "string"
    }
  ],
  "CreateBy": 1,
  "CreateName": null,
  "CreateDate": "2021-08-31T11:39:24.527",
  "LastUpdateDate": null,
  "UpdateName": null,
  "LastUpdateBy": null,
  "RowNumber": 0
}
*/

  int? itemId;
  String? itemCode;
  int? baseCategoryId;
  int? categoryId;
  int? brandId;
  int? unitId;
  int? minPrice;
  int? maxPrice;
  String? vietnameseName;
  String? englishName;
  String? vietnameseSlug;
  String? englishSlug;
  String? vietnameseShortDescription;
  String? englishShortDescription;
  String? image;
  String? vietnameseContent;
  String? englishContent;
  String? vietnameseOthorContent;
  String? englishOthorContent;
  String? vietnameseKeyword;
  String? englishKeyword;
  String? vietnameseDescription;
  String? englishDescription;
  int? price;
  String? length;
  String? width;
  String? heighth;
  String? weight;
  String? warrantyTime;
  bool? isActive;
  bool? isFeature;
  bool? isNewest;
  bool? isBestSell;
  bool? isFreeShip;
  String? voucherExpired;
  bool? isMixItem;
  String? searchKeyword;
  List<ItemFilter>? itemFilters;
  List<ItemImage>? itemImages;
  List<Variant>? variants;
  List<ItemReview>? itemReviews;
  List<ItemRelate>? itemRelates;
  List<ItemSpecificationse>? itemSpecificationses;
  List<ItemBox>? itemBoxes;
  List<ItemVoucher>? itemVouchers;
  List<SimilarProducts>? similarProduct;
  String? variantsArray;
  int? reviewCount;
  int? reviewAvgPoint;
  int? discountType;
  int? discountValue;
  String? unitCode;
  String? brandCode;
  String? brandName;
  String? categoryName;
  String? baseCategoryName;
  String? brandSlug;
  List<ItemCompare>? itemCompares;
  List<ItemVideo>? itemVideos;
  List<ItemPost>? itemPosts;
  int? createBy;
  String? createName;
  String? createDate;
  String? lastUpdateDate;
  String? updateName;
  String? lastUpdateBy;
  int? rowNumber;

  DetailProductData({
    this.itemId,
    this.itemCode,
    this.baseCategoryId,
    this.categoryId,
    this.brandId,
    this.unitId,
    this.minPrice,
    this.maxPrice,
    this.vietnameseName,
    this.englishName,
    this.vietnameseSlug,
    this.englishSlug,
    this.vietnameseShortDescription,
    this.englishShortDescription,
    this.image,
    this.vietnameseContent,
    this.englishContent,
    this.vietnameseOthorContent,
    this.englishOthorContent,
    this.vietnameseKeyword,
    this.englishKeyword,
    this.vietnameseDescription,
    this.englishDescription,
    this.price,
    this.length,
    this.width,
    this.heighth,
    this.weight,
    this.warrantyTime,
    this.isActive,
    this.isFeature,
    this.isNewest,
    this.isBestSell,
    this.isFreeShip,
    this.voucherExpired,
    this.isMixItem,
    this.searchKeyword,
    this.itemFilters,
    this.itemImages,
    this.variants,
    this.itemReviews,
    this.itemRelates,
    this.itemSpecificationses,
    this.itemBoxes,
    this.itemVouchers,
    this.similarProduct,
    this.variantsArray,
    this.reviewCount,
    this.reviewAvgPoint,
    this.discountType,
    this.discountValue,
    this.unitCode,
    this.brandCode,
    this.brandName,
    this.categoryName,
    this.baseCategoryName,
    this.brandSlug,
    this.itemCompares,
    this.itemVideos,
    this.itemPosts,
    this.createBy,
    this.createName,
    this.createDate,
    this.lastUpdateDate,
    this.updateName,
    this.lastUpdateBy,
    this.rowNumber,
  });

  DetailProductData.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    itemCode = json["ItemCode"]?.toString();
    baseCategoryId = json["BaseCategoryId"]?.toInt();
    categoryId = json["CategoryId"]?.toInt();
    brandId = json["BrandId"]?.toInt();
    unitId = json["UnitId"]?.toInt();
    minPrice = json["MinPrice"]?.toInt();
    maxPrice = json["MaxPrice"]?.toInt();
    vietnameseName = json["VietnameseName"]?.toString();
    englishName = json["EnglishName"]?.toString();
    vietnameseSlug = json["VietnameseSlug"]?.toString();
    englishSlug = json["EnglishSlug"]?.toString();
    vietnameseShortDescription = json["VietnameseShortDescription"]?.toString();
    englishShortDescription = json["EnglishShortDescription"]?.toString();
    image = json["Image"]?.toString();
    vietnameseContent = json["VietnameseContent"]?.toString();
    englishContent = json["EnglishContent"]?.toString();
    vietnameseOthorContent = json["VietnameseOthorContent"]?.toString();
    englishOthorContent = json["EnglishOthorContent"]?.toString();
    vietnameseKeyword = json["VietnameseKeyword"]?.toString();
    englishKeyword = json["EnglishKeyword"]?.toString();
    vietnameseDescription = json["VietnameseDescription"]?.toString();
    englishDescription = json["EnglishDescription"]?.toString();
    price = json["Price"]?.toInt();
    length = json["Length"]?.toString();
    width = json["Width"]?.toString();
    heighth = json["Heighth"]?.toString();
    weight = json["Weight"]?.toString();
    warrantyTime = json["WarrantyTime"]?.toString();
    isActive = json["IsActive"];
    isFeature = json["IsFeature"];
    isNewest = json["IsNewest"];
    isBestSell = json["IsBestSell"];
    isFreeShip = json["IsFreeShip"];
    voucherExpired = json["VoucherExpired"]?.toString();
    isMixItem = json["IsMixItem"];
    searchKeyword = json["SearchKeyword"]?.toString();
    if (json["ItemFilters"] != null) {
      final v = json["ItemFilters"];
      final arr0 = <ItemFilter>[];
      v.forEach((v) {
        arr0.add(ItemFilter.fromJson(v));
      });
      itemFilters = arr0;
    }
    if (json["ItemImages"] != null) {
      final v = json["ItemImages"];
      final arr0 = <ItemImage>[];
      v.forEach((v) {
        arr0.add(ItemImage.fromJson(v));
      });
      itemImages = arr0;
    }
    if (json["Variants"] != null) {
      final v = json["Variants"];
      final arr0 = <Variant>[];
      v.forEach((v) {
        arr0.add(Variant.fromJson(v));
      });
      variants = arr0;
    }
    if (json["ItemReviews"] != null) {
      final v = json["ItemReviews"];
      final arr0 = <ItemReview>[];
      v.forEach((v) {
        arr0.add(ItemReview.fromJson(v));
      });
      itemReviews = arr0;
    }
    if (json["ItemRelates"] != null) {
      final v = json["ItemRelates"];
      final arr0 = <ItemRelate>[];
      v.forEach((v) {
        arr0.add(ItemRelate.fromJson(v));
      });
      itemRelates = arr0;
    }
    if (json["ItemSpecificationses"] != null) {
      final v = json["ItemSpecificationses"];
      final arr0 = <ItemSpecificationse>[];
      v.forEach((v) {
        arr0.add(ItemSpecificationse.fromJson(v));
      });
      itemSpecificationses = arr0;
    }
    if (json["ItemBoxes"] != null) {
      final v = json["ItemBoxes"];
      final arr0 = <ItemBox>[];
      v.forEach((v) {
        arr0.add(ItemBox.fromJson(v));
      });
      itemBoxes = arr0;
    }
    if (json["ItemVouchers"] != null) {
      final v = json["ItemVouchers"];
      final arr0 = <ItemVoucher>[];
      v.forEach((v) {
        arr0.add(ItemVoucher.fromJson(v));
      });
      itemVouchers = arr0;
    }
    if (json["SimilarProduct"] != null) {
      final v = json["SimilarProduct"];
      final arr0 = <SimilarProducts>[];
      v.forEach((v) {
        arr0.add(SimilarProducts.fromJson(v));
      });
      similarProduct = arr0;
    }
    variantsArray = json["VariantsArray"]?.toString();
    reviewCount = json["ReviewCount"]?.toInt();
    reviewAvgPoint = json["ReviewAvgPoint"]?.toInt();
    discountType = json["DiscountType"]?.toInt();
    discountValue = json["DiscountValue"]?.toInt();
    unitCode = json["UnitCode"]?.toString();
    brandCode = json["BrandCode"]?.toString();
    brandName = json["BrandName"]?.toString();
    categoryName = json["CategoryName"]?.toString();
    baseCategoryName = json["BaseCategoryName"]?.toString();
    brandSlug = json["BrandSlug"]?.toString();
    if (json["ItemCompares"] != null) {
      final v = json["ItemCompares"];
      final arr0 = <ItemCompare>[];
      v.forEach((v) {
        arr0.add(ItemCompare.fromJson(v));
      });
      itemCompares = arr0;
    }
    if (json["ItemVideos"] != null) {
      final v = json["ItemVideos"];
      final arr0 = <ItemVideo>[];
      v.forEach((v) {
        arr0.add(ItemVideo.fromJson(v));
      });
      itemVideos = arr0;
    }
    if (json["ItemPosts"] != null) {
      final v = json["ItemPosts"];
      final arr0 = <ItemPost>[];
      v.forEach((v) {
        arr0.add(ItemPost.fromJson(v));
      });
      itemPosts = arr0;
    }
    createBy = json["CreateBy"]?.toInt();
    createName = json["CreateName"]?.toString();
    createDate = json["CreateDate"]?.toString();
    lastUpdateDate = json["LastUpdateDate"]?.toString();
    updateName = json["UpdateName"]?.toString();
    lastUpdateBy = json["LastUpdateBy"]?.toString();
    rowNumber = json["RowNumber"]?.toInt();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["ItemCode"] = itemCode;
    data["BaseCategoryId"] = baseCategoryId;
    data["CategoryId"] = categoryId;
    data["BrandId"] = brandId;
    data["UnitId"] = unitId;
    data["MinPrice"] = minPrice;
    data["MaxPrice"] = maxPrice;
    data["VietnameseName"] = vietnameseName;
    data["EnglishName"] = englishName;
    data["VietnameseSlug"] = vietnameseSlug;
    data["EnglishSlug"] = englishSlug;
    data["VietnameseShortDescription"] = vietnameseShortDescription;
    data["EnglishShortDescription"] = englishShortDescription;
    data["Image"] = image;
    data["VietnameseContent"] = vietnameseContent;
    data["EnglishContent"] = englishContent;
    data["VietnameseOthorContent"] = vietnameseOthorContent;
    data["EnglishOthorContent"] = englishOthorContent;
    data["VietnameseKeyword"] = vietnameseKeyword;
    data["EnglishKeyword"] = englishKeyword;
    data["VietnameseDescription"] = vietnameseDescription;
    data["EnglishDescription"] = englishDescription;
    data["Price"] = price;
    data["Length"] = length;
    data["Width"] = width;
    data["Heighth"] = heighth;
    data["Weight"] = weight;
    data["WarrantyTime"] = warrantyTime;
    data["IsActive"] = isActive;
    data["IsFeature"] = isFeature;
    data["IsNewest"] = isNewest;
    data["IsBestSell"] = isBestSell;
    data["IsFreeShip"] = isFreeShip;
    data["VoucherExpired"] = voucherExpired;
    data["IsMixItem"] = isMixItem;
    data["SearchKeyword"] = searchKeyword;
    if (itemFilters != null) {
      final v = itemFilters;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemFilters"] = arr0;
    }
    if (itemImages != null) {
      final v = itemImages;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemImages"] = arr0;
    }
    if (variants != null) {
      final v = variants;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["Variants"] = arr0;
    }
    if (itemReviews != null) {
      final v = itemReviews;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemReviews"] = arr0;
    }
    if (itemRelates != null) {
      final v = itemRelates;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemRelates"] = arr0;
    }
    if (itemSpecificationses != null) {
      final v = itemSpecificationses;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemSpecificationses"] = arr0;
    }
    if (itemBoxes != null) {
      final v = itemBoxes;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemBoxes"] = arr0;
    }
    if (itemVouchers != null) {
      final v = itemVouchers;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemVouchers"] = arr0;
    }
    if (similarProduct != null) {
      final v = similarProduct;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["SimilarProduct"] = arr0;
    }
    data["VariantsArray"] = variantsArray;
    data["ReviewCount"] = reviewCount;
    data["ReviewAvgPoint"] = reviewAvgPoint;
    data["DiscountType"] = discountType;
    data["DiscountValue"] = discountValue;
    data["UnitCode"] = unitCode;
    data["BrandCode"] = brandCode;
    data["BrandName"] = brandName;
    data["CategoryName"] = categoryName;
    data["BaseCategoryName"] = baseCategoryName;
    data["BrandSlug"] = brandSlug;
    if (itemCompares != null) {
      final v = itemCompares;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemCompares"] = arr0;
    }
    if (itemVideos != null) {
      final v = itemVideos;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemVideos"] = arr0;
    }
    if (itemPosts != null) {
      final v = itemPosts;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemPosts"] = arr0;
    }
    data["CreateBy"] = createBy;
    data["CreateName"] = createName;
    data["CreateDate"] = createDate;
    data["LastUpdateDate"] = lastUpdateDate;
    data["UpdateName"] = updateName;
    data["LastUpdateBy"] = lastUpdateBy;
    data["RowNumber"] = rowNumber;
    return data;
  }
}

class ItemPost {
/*
{
  "ItemId": 0,
  "PostId": 0,
  "Image": "string",
  "VietnameseSlug": "string",
  "EnglishSlug": "string",
  "VietnameseName": "string",
  "EnglishName": "string"
}
*/

  int? itemId;
  int? postId;
  String? image;
  String? vietnameseSlug;
  String? englishSlug;
  String? vietnameseName;
  String? englishName;

  ItemPost({
    this.itemId,
    this.postId,
    this.image,
    this.vietnameseSlug,
    this.englishSlug,
    this.vietnameseName,
    this.englishName,
  });

  ItemPost.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    postId = json["PostId"]?.toInt();
    image = json["Image"]?.toString();
    vietnameseSlug = json["VietnameseSlug"]?.toString();
    englishSlug = json["EnglishSlug"]?.toString();
    vietnameseName = json["VietnameseName"]?.toString();
    englishName = json["EnglishName"]?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["PostId"] = postId;
    data["Image"] = image;
    data["VietnameseSlug"] = vietnameseSlug;
    data["EnglishSlug"] = englishSlug;
    data["VietnameseName"] = vietnameseName;
    data["EnglishName"] = englishName;
    return data;
  }
}

class ItemVideo {
/*
{
  "ItemId": 0,
  "VideoId": 0,
  "YoutubeVideoId": "string",
  "VietnameseSlug": "string",
  "EnglishSlug": "string",
  "VietnameseName": "string",
  "EnglishName": "string"
}
*/

  int? itemId;
  int? videoId;
  String? youtubeVideoId;
  String? vietnameseSlug;
  String? englishSlug;
  String? vietnameseName;
  String? englishName;

  ItemVideo({
    this.itemId,
    this.videoId,
    this.youtubeVideoId,
    this.vietnameseSlug,
    this.englishSlug,
    this.vietnameseName,
    this.englishName,
  });

  ItemVideo.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    videoId = json["VideoId"]?.toInt();
    youtubeVideoId = json["YoutubeVideoId"]?.toString();
    vietnameseSlug = json["VietnameseSlug"]?.toString();
    englishSlug = json["EnglishSlug"]?.toString();
    vietnameseName = json["VietnameseName"]?.toString();
    englishName = json["EnglishName"]?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["VideoId"] = videoId;
    data["YoutubeVideoId"] = youtubeVideoId;
    data["VietnameseSlug"] = vietnameseSlug;
    data["EnglishSlug"] = englishSlug;
    data["VietnameseName"] = vietnameseName;
    data["EnglishName"] = englishName;
    return data;
  }
}

class ItemCompare {
/*
{
  "ItemId": 0,
  "ItemCompareId": 0,
  "VietnameseName": "string"
}
*/

  int? itemId;
  int? itemCompareId;
  String? vietnameseName;

  ItemCompare({
    this.itemId,
    this.itemCompareId,
    this.vietnameseName,
  });

  ItemCompare.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    itemCompareId = json["ItemCompareId"]?.toInt();
    vietnameseName = json["VietnameseName"]?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["ItemCompareId"] = itemCompareId;
    data["VietnameseName"] = vietnameseName;
    return data;
  }
}

class SimilarProducts {
/*
{
  "IdProduct": 1,
  "VietnameseValue": "Viên Bio Island Lysine Của Úc Cho Trẻ Từ 6 Tuổi Trở Lên, 60 viên",
  "EnglishValue": "Viên Bio Island Lysine Của Úc Cho Trẻ Từ 6 Tuổi Trở Lên, 60 viên",
  "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/09/vien-uong-bio-island-lysine-ho-tro-tre-tang-chieu-cao-uc-59b8f99aeffd7-13092017162546.png",
  "Price": 234500
}
*/

  int? idProduct;
  String? vietnameseValue;
  String? englishValue;
  String? image;
  int? price;

  SimilarProducts({
    this.idProduct,
    this.vietnameseValue,
    this.englishValue,
    this.image,
    this.price,
  });

  SimilarProducts.fromJson(Map<String, dynamic> json) {
    idProduct = json["IdProduct"]?.toInt();
    vietnameseValue = json["VietnameseValue"]?.toString();
    englishValue = json["EnglishValue"]?.toString();
    image = json["Image"]?.toString();
    price = json["Price"]?.toInt();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["IdProduct"] = idProduct;
    data["VietnameseValue"] = vietnameseValue;
    data["EnglishValue"] = englishValue;
    data["Image"] = image;
    data["Price"] = price;
    return data;
  }
}

class ItemVoucher {
/*
{
  "ItemId": 0,
  "VietnameseValue": "string",
  "EnglishValue": "string",
  "SortOrder": 0
}
*/

  int? itemId;
  String? vietnameseValue;
  String? englishValue;
  int? sortOrder;

  ItemVoucher({
    this.itemId,
    this.vietnameseValue,
    this.englishValue,
    this.sortOrder,
  });

  ItemVoucher.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    vietnameseValue = json["VietnameseValue"]?.toString();
    englishValue = json["EnglishValue"]?.toString();
    sortOrder = json["SortOrder"]?.toInt();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["VietnameseValue"] = vietnameseValue;
    data["EnglishValue"] = englishValue;
    data["SortOrder"] = sortOrder;
    return data;
  }
}

class ItemBox {
/*
{
  "ItemId": 0,
  "VietnameseValue": "string",
  "EnglishValue": "string",
  "SortOrder": 0
}
*/

  int? itemId;
  String? vietnameseValue;
  String? englishValue;
  int? sortOrder;

  ItemBox({
    this.itemId,
    this.vietnameseValue,
    this.englishValue,
    this.sortOrder,
  });

  ItemBox.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    vietnameseValue = json["VietnameseValue"]?.toString();
    englishValue = json["EnglishValue"]?.toString();
    sortOrder = json["SortOrder"]?.toInt();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["VietnameseValue"] = vietnameseValue;
    data["EnglishValue"] = englishValue;
    data["SortOrder"] = sortOrder;
    return data;
  }
}

class ItemSpecificationse {
/*
{
  "ItemId": 0,
  "VietnameseName": "string",
  "VietnameseValue": "string",
  "VietnameseGroup": "string",
  "EnglishName": "string",
  "EnglishValue": "string",
  "EnglishGroup": "string",
  "SortOrder": 0,
  "Display": true
}
*/

  int? itemId;
  String? vietnameseName;
  String? vietnameseValue;
  String? vietnameseGroup;
  String? englishName;
  String? englishValue;
  String? englishGroup;
  int? sortOrder;
  bool? display;

  ItemSpecificationse({
    this.itemId,
    this.vietnameseName,
    this.vietnameseValue,
    this.vietnameseGroup,
    this.englishName,
    this.englishValue,
    this.englishGroup,
    this.sortOrder,
    this.display,
  });

  ItemSpecificationse.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    vietnameseName = json["VietnameseName"]?.toString();
    vietnameseValue = json["VietnameseValue"]?.toString();
    vietnameseGroup = json["VietnameseGroup"]?.toString();
    englishName = json["EnglishName"]?.toString();
    englishValue = json["EnglishValue"]?.toString();
    englishGroup = json["EnglishGroup"]?.toString();
    sortOrder = json["SortOrder"]?.toInt();
    display = json["Display"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["VietnameseName"] = vietnameseName;
    data["VietnameseValue"] = vietnameseValue;
    data["VietnameseGroup"] = vietnameseGroup;
    data["EnglishName"] = englishName;
    data["EnglishValue"] = englishValue;
    data["EnglishGroup"] = englishGroup;
    data["SortOrder"] = sortOrder;
    data["Display"] = display;
    return data;
  }
}

class ItemRelate {
/*
{
  "ItemId": 0,
  "RelateItemId": 0,
  "VietnameseName": "string"
}
*/

  int? itemId;
  int? relateItemId;
  String? vietnameseName;

  ItemRelate({
    this.itemId,
    this.relateItemId,
    this.vietnameseName,
  });

  ItemRelate.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    relateItemId = json["RelateItemId"]?.toInt();
    vietnameseName = json["VietnameseName"]?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["RelateItemId"] = relateItemId;
    data["VietnameseName"] = vietnameseName;
    return data;
  }
}

class ItemReview {
/*
{
  "ReviewId": "1",
  "ItemId": 0,
  "CustomerId": 0,
  "FullName": "Nguyễn Công Ngọc",
  "Email": "congngoc@gmail.com",
  "Publish": true,
  "ReviewDate": "2021-09-16T12:09:48.921Z",
  "ReviewPoint": 0,
  "Comment": "Shop có hàng nữa không ?",
  "ItemName": "string",
  "ReviewHtml": "https://halotravel.vn/wp-content/uploads/2020/07/thach_trangg_101029297_573874646879779_1794923475739360981_n.jpg"
}
*/

  String? reviewId;
  int? itemId;
  int? customerId;
  String? fullName;
  String? email;
  bool? publish;
  String? reviewDate;
  int? reviewPoint;
  String? comment;
  String? itemName;
  String? reviewHtml;

  ItemReview({
    this.reviewId,
    this.itemId,
    this.customerId,
    this.fullName,
    this.email,
    this.publish,
    this.reviewDate,
    this.reviewPoint,
    this.comment,
    this.itemName,
    this.reviewHtml,
  });

  ItemReview.fromJson(Map<String, dynamic> json) {
    reviewId = json["ReviewId"]?.toString();
    itemId = json["ItemId"]?.toInt();
    customerId = json["CustomerId"]?.toInt();
    fullName = json["FullName"]?.toString();
    email = json["Email"]?.toString();
    publish = json["Publish"];
    reviewDate = json["ReviewDate"]?.toString();
    reviewPoint = json["ReviewPoint"]?.toInt();
    comment = json["Comment"]?.toString();
    itemName = json["ItemName"]?.toString();
    reviewHtml = json["ReviewHtml"]?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ReviewId"] = reviewId;
    data["ItemId"] = itemId;
    data["CustomerId"] = customerId;
    data["FullName"] = fullName;
    data["Email"] = email;
    data["Publish"] = publish;
    data["ReviewDate"] = reviewDate;
    data["ReviewPoint"] = reviewPoint;
    data["Comment"] = comment;
    data["ItemName"] = itemName;
    data["ReviewHtml"] = reviewHtml;
    return data;
  }
}

class ItemProducts {
/*
{
  "ItemId": 1,
  "VariantId": 1,
  "VariantCode": "Mẫu mới",
  "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
  "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
  "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
  "Price": 240000
}
*/

  int? itemId;
  int? variantId;
  String? variantCode;
  String? vietnameseName;
  String? englishName;
  String? image;
  int? price;

  ItemProducts({
    this.itemId,
    this.variantId,
    this.variantCode,
    this.vietnameseName,
    this.englishName,
    this.image,
    this.price,
  });

  ItemProducts.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    variantId = json["VariantId"]?.toInt();
    variantCode = json["VariantCode"]?.toString();
    vietnameseName = json["VietnameseName"]?.toString();
    englishName = json["EnglishName"]?.toString();
    image = json["Image"]?.toString();
    price = json["Price"]?.toInt();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["VariantId"] = variantId;
    data["VariantCode"] = variantCode;
    data["VietnameseName"] = vietnameseName;
    data["EnglishName"] = englishName;
    data["Image"] = image;
    data["Price"] = price;
    return data;
  }
}

class SubVariants {
/*
{
  "ItemId": 1,
  "VariantId": 1,
  "VariantCode": "Mẫu mới",
  "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
  "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
  "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
  "Price": 240000,
  "ItemProduct": {
    "ItemId": 1,
    "VariantId": 1,
    "VariantCode": "Mẫu mới",
    "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
    "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
    "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
    "Price": 240000
  }
}
*/

  int? itemId;
  int? variantId;
  String? variantCode;
  String? vietnameseName;
  String? englishName;
  String? image;
  int? price;
  List<ItemProducts>? itemProduct;

  SubVariants({
    this.itemId,
    this.variantId,
    this.variantCode,
    this.vietnameseName,
    this.englishName,
    this.image,
    this.price,
    this.itemProduct,
  });

  SubVariants.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    variantId = json["VariantId"]?.toInt();
    variantCode = json["VariantCode"]?.toString();
    vietnameseName = json["VietnameseName"]?.toString();
    englishName = json["EnglishName"]?.toString();
    image = json["Image"]?.toString();
    price = json["Price"]?.toInt();
    if (json["ItemProducts"] != null) {
      final v = json["ItemProducts"];
      final arr0 = <ItemProducts>[];
      v.forEach((v) {
        arr0.add(ItemProducts.fromJson(v));
      });
      itemProduct = arr0;
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["VariantId"] = variantId;
    data["VariantCode"] = variantCode;
    data["VietnameseName"] = vietnameseName;
    data["EnglishName"] = englishName;
    data["Image"] = image;
    data["Price"] = price;
    if (itemProduct != null) {
      final v = itemProduct;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["ItemProduct"] = arr0;
    }
    return data;
  }
}

class Variant {
/*
{
  "ItemId": 1,
  "VariantId": 1,
  "VariantCode": "Mẫu mới",
  "Upc": null,
  "FullVariantCode": "P2068",
  "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
  "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
  "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
  "Price": 240000,
  "Length": null,
  "Width": null,
  "Heighth": null,
  "Weight": 1200,
  "ItemCode": null,
  "ItemName": null,
  "UnitCode": null,
  "ShortDescription": null,
  "Slug": null,
  "ItemImage": null,
  "BrandName": null,
  "BrandCode": null,
  "DiscountType": null,
  "DiscountValue": null,
  "DiscountPrice": 0,
  "SubPrice": 240000,
  "PriceFormat": "240,000",
  "SubPriceFormat": "240,000",
  "SubVariant": {
    "ItemId": 1,
    "VariantId": 1,
    "VariantCode": "Mẫu mới",
    "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
    "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
    "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
    "Price": 240000,
    "ItemProduct": {
      "ItemId": 1,
      "VariantId": 1,
      "VariantCode": "Mẫu mới",
      "VietnameseName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
      "EnglishName": "GH Creation EX Viên Uống Tăng Chiều Cao Chính Hãng Nhật Bản, 270 viên",
      "Image": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg",
      "Price": 240000
    }
  }
}
*/

  int? itemId;
  int? variantId;
  String? variantCode;
  String? upc;
  String? fullVariantCode;
  String? vietnameseName;
  String? englishName;
  String? image;
  int? price;
  String? length;
  String? width;
  String? heighth;
  int? weight;
  String? itemCode;
  String? itemName;
  String? unitCode;
  String? shortDescription;
  String? slug;
  String? itemImage;
  String? brandName;
  String? brandCode;
  String? discountType;
  String? discountValue;
  int? discountPrice;
  int? subPrice;
  String? priceFormat;
  String? subPriceFormat;
  List<SubVariants>? subVariant;

  Variant({
    this.itemId,
    this.variantId,
    this.variantCode,
    this.upc,
    this.fullVariantCode,
    this.vietnameseName,
    this.englishName,
    this.image,
    this.price,
    this.length,
    this.width,
    this.heighth,
    this.weight,
    this.itemCode,
    this.itemName,
    this.unitCode,
    this.shortDescription,
    this.slug,
    this.itemImage,
    this.brandName,
    this.brandCode,
    this.discountType,
    this.discountValue,
    this.discountPrice,
    this.subPrice,
    this.priceFormat,
    this.subPriceFormat,
    this.subVariant,
  });

  Variant.fromJson(Map<String, dynamic> json) {
    itemId = json["ItemId"]?.toInt();
    variantId = json["VariantId"]?.toInt();
    variantCode = json["VariantCode"]?.toString();
    upc = json["Upc"]?.toString();
    fullVariantCode = json["FullVariantCode"]?.toString();
    vietnameseName = json["VietnameseName"]?.toString();
    englishName = json["EnglishName"]?.toString();
    image = json["Image"]?.toString();
    price = json["Price"]?.toInt();
    length = json["Length"]?.toString();
    width = json["Width"]?.toString();
    heighth = json["Heighth"]?.toString();
    weight = json["Weight"]?.toInt();
    itemCode = json["ItemCode"]?.toString();
    itemName = json["ItemName"]?.toString();
    unitCode = json["UnitCode"]?.toString();
    shortDescription = json["ShortDescription"]?.toString();
    slug = json["Slug"]?.toString();
    itemImage = json["ItemImage"]?.toString();
    brandName = json["BrandName"]?.toString();
    brandCode = json["BrandCode"]?.toString();
    discountType = json["DiscountType"]?.toString();
    discountValue = json["DiscountValue"]?.toString();
    discountPrice = json["DiscountPrice"]?.toInt();
    subPrice = json["SubPrice"]?.toInt();
    priceFormat = json["PriceFormat"]?.toString();
    subPriceFormat = json["SubPriceFormat"]?.toString();
    if (json["SubVariants"] != null) {
      final v = json["SubVariants"];
      final arr0 = <SubVariants>[];
      v.forEach((v) {
        arr0.add(SubVariants.fromJson(v));
      });
      subVariant = arr0;
    }  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ItemId"] = itemId;
    data["VariantId"] = variantId;
    data["VariantCode"] = variantCode;
    data["Upc"] = upc;
    data["FullVariantCode"] = fullVariantCode;
    data["VietnameseName"] = vietnameseName;
    data["EnglishName"] = englishName;
    data["Image"] = image;
    data["Price"] = price;
    data["Length"] = length;
    data["Width"] = width;
    data["Heighth"] = heighth;
    data["Weight"] = weight;
    data["ItemCode"] = itemCode;
    data["ItemName"] = itemName;
    data["UnitCode"] = unitCode;
    data["ShortDescription"] = shortDescription;
    data["Slug"] = slug;
    data["ItemImage"] = itemImage;
    data["BrandName"] = brandName;
    data["BrandCode"] = brandCode;
    data["DiscountType"] = discountType;
    data["DiscountValue"] = discountValue;
    data["DiscountPrice"] = discountPrice;
    data["SubPrice"] = subPrice;
    data["PriceFormat"] = priceFormat;
    data["SubPriceFormat"] = subPriceFormat;
    if (subVariant != null) {
      final v = subVariant;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["SubVariants"] = arr0;
    }
    return data;
  }
}

class ItemImage {
/*
{
  "ImageId": "6FEE59C2-BBEF-42AE-9D13-9F450953937A",
  "ItemId": 1,
  "VietnameseAlt": null,
  "EnglishAlt": null,
  "VariantCode": null,
  "Src": "unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/04/gh-creation-thuoc-tang-chieu-cao-nhat-ban-5902b609357a6-28042017102457.jpg"
}
*/

  String? imageId;
  int? itemId;
  String? vietnameseAlt;
  String? englishAlt;
  String? variantCode;
  String? src;

  ItemImage({
    this.imageId,
    this.itemId,
    this.vietnameseAlt,
    this.englishAlt,
    this.variantCode,
    this.src,
  });

  ItemImage.fromJson(Map<String, dynamic> json) {
    imageId = json["ImageId"]?.toString();
    itemId = json["ItemId"]?.toInt();
    vietnameseAlt = json["VietnameseAlt"]?.toString();
    englishAlt = json["EnglishAlt"]?.toString();
    variantCode = json["VariantCode"]?.toString();
    src = json["Src"]?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["ImageId"] = imageId;
    data["ItemId"] = itemId;
    data["VietnameseAlt"] = vietnameseAlt;
    data["EnglishAlt"] = englishAlt;
    data["VariantCode"] = variantCode;
    data["Src"] = src;
    return data;
  }
}

class ItemFilter {
/*
{
  "FilterId": 0,
  "ItemId": 0,
  "VietnameseName": "string",
  "EnglishName": "string",
  "Description": "string",
  "VietnameseGroupName": "string",
  "EnglishGroupName": "string"
}
*/

  int? filterId;
  int? itemId;
  String? vietnameseName;
  String? englishName;
  String? description;
  String? vietnameseGroupName;
  String? englishGroupName;

  ItemFilter({
    this.filterId,
    this.itemId,
    this.vietnameseName,
    this.englishName,
    this.description,
    this.vietnameseGroupName,
    this.englishGroupName,
  });

  ItemFilter.fromJson(Map<String, dynamic> json) {
    filterId = json["FilterId"]?.toInt();
    itemId = json["ItemId"]?.toInt();
    vietnameseName = json["VietnameseName"]?.toString();
    englishName = json["EnglishName"]?.toString();
    description = json["Description"]?.toString();
    vietnameseGroupName = json["VietnameseGroupName"]?.toString();
    englishGroupName = json["EnglishGroupName"]?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["FilterId"] = filterId;
    data["ItemId"] = itemId;
    data["VietnameseName"] = vietnameseName;
    data["EnglishName"] = englishName;
    data["Description"] = description;
    data["VietnameseGroupName"] = vietnameseGroupName;
    data["EnglishGroupName"] = englishGroupName;
    return data;
  }
}




