class DipRegisInfoModel {
  Result? result;

  DipRegisInfoModel({this.result});

  DipRegisInfoModel.fromJson(Map<String, dynamic> json) {
    result = json['result'] != null ? new Result.fromJson(json['result']) : null;
  }

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

class Result {
  int? id;
  Null? urlCode;
  String? name;
  String? cover;
  String? excerpt;
  String? detail;
  String? price;
  Null? specialPrice;
  Null? sku;
  Null? tax;
  Null? quantity;
  Null? size;
  String? visibility;
  Null? newsFromDate;
  Null? newsToDate;
  Null? layout;
  Null? theme;
  Null? duration;
  Null? sellingStartTime;
  Null? sellingEndTime;
  Null? redemptionStartTime;
  Null? redemptionEndTime;
  Null? availibility;
  String? isFeatured;
  String? isDeal;
  String? reviewStatus;
  String? relatedStatus;
  String? upSellsStatus;
  String? crossSellsStatus;
  String? allowGiftMessage;
  String? stockStatus;
  String? status;
  Null? dimension;
  Null? groupId;
  String? tags;
  Null? attributeSet;
  Null? vendorId;
  Null? allowRoute;
  String? type;
  String? createdAt;
  String? updatedAt;
  String? createdDate;
  Null? updatedDate;
  int? createBy;
  Null? updatedBy;
  Null? groupData;
  Null? address;
  Null? industryGroup;
  Null? objectiveSale;
  int? storeId;
  Null? location;
  Null? target;
  DipRegisInfo? dipRegisInfo;
  String? contractType;
  List<Category>? category;
  Store? store;
  IntellectualType? intellectualType;
  List<Images>? images;
  List<RelateData>? relateData;

  Result({this.id, this.urlCode, this.name, this.cover, this.excerpt, this.detail, this.price, this.specialPrice, this.sku, this.tax, this.quantity, this.size, this.visibility, this.newsFromDate, this.newsToDate, this.layout, this.theme, this.duration, this.sellingStartTime, this.sellingEndTime, this.redemptionStartTime, this.redemptionEndTime, this.availibility, this.isFeatured, this.isDeal, this.reviewStatus, this.relatedStatus, this.upSellsStatus, this.crossSellsStatus, this.allowGiftMessage, this.stockStatus, this.status, this.dimension, this.groupId, this.tags, this.attributeSet, this.vendorId, this.allowRoute, this.type, this.createdAt, this.updatedAt, this.createdDate, this.updatedDate, this.createBy, this.updatedBy, this.groupData, this.address, this.industryGroup, this.objectiveSale, this.storeId, this.location, this.target, this.dipRegisInfo, this.contractType, this.category, this.store, this.intellectualType, this.images, this.relateData});

  Result.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    urlCode = json['url_code'];
    name = json['name'];
    cover = json['cover'];
    excerpt = json['excerpt'];
    detail = json['detail'];
    price = json['price'];
    specialPrice = json['special_price'];
    sku = json['sku'];
    tax = json['tax'];
    quantity = json['quantity'];
    size = json['size'];
    visibility = json['visibility'];
    newsFromDate = json['news_from_date'];
    newsToDate = json['news_to_date'];
    layout = json['layout'];
    theme = json['theme'];
    duration = json['duration'];
    sellingStartTime = json['selling_start_time'];
    sellingEndTime = json['selling_end_time'];
    redemptionStartTime = json['redemption_start_time'];
    redemptionEndTime = json['redemption_end_time'];
    availibility = json['availibility'];
    isFeatured = json['is_featured'];
    isDeal = json['is_deal'];
    reviewStatus = json['review_status'];
    relatedStatus = json['related_status'];
    upSellsStatus = json['up_sells_status'];
    crossSellsStatus = json['cross_sells_status'];
    allowGiftMessage = json['allow_gift_message'];
    stockStatus = json['stock_status'];
    status = json['status'];
    dimension = json['dimension'];
    groupId = json['group_id'];
    tags = json['tags'];
    attributeSet = json['attribute_set'];
    vendorId = json['vendor_id'];
    allowRoute = json['allow_route'];
    type = json['type'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
    createdDate = json['created_date'];
    updatedDate = json['updated_date'];
    createBy = json['create_by'];
    updatedBy = json['updated_by'];
    groupData = json['group_data'];
    address = json['address'];
    industryGroup = json['industry_group'];
    objectiveSale = json['objective_sale'];
    storeId = json['store_id'];
    location = json['location'];
    target = json['target'];
    dipRegisInfo = json['dip_regis_info'] != null ? new DipRegisInfo.fromJson(json['dip_regis_info']) : null;
    contractType = json['contract_type'];
    if (json['category'] != null) {
      category = <Category>[];
      json['category'].forEach((v) { category!.add(new Category.fromJson(v)); });
    }
    store = json['store'] != null ? new Store.fromJson(json['store']) : null;
    intellectualType = json['intellectual_type'] != null ? new IntellectualType.fromJson(json['intellectual_type']) : null;
    if (json['images'] != null) {
      images = <Images>[];
      json['images'].forEach((v) { images!.add(new Images.fromJson(v)); });
    }
    if (json['relate_data'] != null) {
      relateData = <RelateData>[];
      json['relate_data'].forEach((v) { relateData!.add(new RelateData.fromJson(v)); });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['url_code'] = this.urlCode;
    data['name'] = this.name;
    data['cover'] = this.cover;
    data['excerpt'] = this.excerpt;
    data['detail'] = this.detail;
    data['price'] = this.price;
    data['special_price'] = this.specialPrice;
    data['sku'] = this.sku;
    data['tax'] = this.tax;
    data['quantity'] = this.quantity;
    data['size'] = this.size;
    data['visibility'] = this.visibility;
    data['news_from_date'] = this.newsFromDate;
    data['news_to_date'] = this.newsToDate;
    data['layout'] = this.layout;
    data['theme'] = this.theme;
    data['duration'] = this.duration;
    data['selling_start_time'] = this.sellingStartTime;
    data['selling_end_time'] = this.sellingEndTime;
    data['redemption_start_time'] = this.redemptionStartTime;
    data['redemption_end_time'] = this.redemptionEndTime;
    data['availibility'] = this.availibility;
    data['is_featured'] = this.isFeatured;
    data['is_deal'] = this.isDeal;
    data['review_status'] = this.reviewStatus;
    data['related_status'] = this.relatedStatus;
    data['up_sells_status'] = this.upSellsStatus;
    data['cross_sells_status'] = this.crossSellsStatus;
    data['allow_gift_message'] = this.allowGiftMessage;
    data['stock_status'] = this.stockStatus;
    data['status'] = this.status;
    data['dimension'] = this.dimension;
    data['group_id'] = this.groupId;
    data['tags'] = this.tags;
    data['attribute_set'] = this.attributeSet;
    data['vendor_id'] = this.vendorId;
    data['allow_route'] = this.allowRoute;
    data['type'] = this.type;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    data['created_date'] = this.createdDate;
    data['updated_date'] = this.updatedDate;
    data['create_by'] = this.createBy;
    data['updated_by'] = this.updatedBy;
    data['group_data'] = this.groupData;
    data['address'] = this.address;
    data['industry_group'] = this.industryGroup;
    data['objective_sale'] = this.objectiveSale;
    data['store_id'] = this.storeId;
    data['location'] = this.location;
    data['target'] = this.target;
    if (this.dipRegisInfo != null) {
      data['dip_regis_info'] = this.dipRegisInfo!.toJson();
    }
    data['contract_type'] = this.contractType;
    if (this.category != null) {
      data['category'] = this.category!.map((v) => v.toJson()).toList();
    }
    if (this.store != null) {
      data['store'] = this.store!.toJson();
    }
    if (this.intellectualType != null) {
      data['intellectual_type'] = this.intellectualType!.toJson();
    }
    if (this.images != null) {
      data['images'] = this.images!.map((v) => v.toJson()).toList();
    }
    if (this.relateData != null) {
      data['relate_data'] = this.relateData!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class DipRegisInfo {
  String? requestNumber;
  String? requestDate;
  String? expireDate;
  String? name;
  String? requestName;
  String? addressOfRequestName;
  String? certificateNumber;
  String? certificateDate;

  DipRegisInfo({this.requestNumber, this.requestDate, this.expireDate, this.name, this.requestName, this.addressOfRequestName, this.certificateNumber, this.certificateDate});

  DipRegisInfo.fromJson(Map<String, dynamic> json) {
    requestNumber = json['request_number'];
    requestDate = json['request_date'];
    expireDate = json['expire_date'];
    name = json['name'];
    requestName = json['request_name'];
    addressOfRequestName = json['address_of_request_name'];
    certificateNumber = json['certificate_number'];
    certificateDate = json['certificate_date'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['request_number'] = this.requestNumber;
    data['request_date'] = this.requestDate;
    data['expire_date'] = this.expireDate;
    data['name'] = this.name;
    data['request_name'] = this.requestName;
    data['address_of_request_name'] = this.addressOfRequestName;
    data['certificate_number'] = this.certificateNumber;
    data['certificate_date'] = this.certificateDate;
    return data;
  }
}

class Category {
  int? id;
  int? parentId;
  String? name;
  String? code;
  String? link;
  String? detail;
  String? type;
  String? status;
  int? sortOrder;
  String? group;
  String? level;
  String? createdAt;
  String? updatedAt;
  String? cover;
  String? defineLangeEn;

  Category({this.id, this.parentId, this.name, this.code, this.link, this.detail, this.type, this.status, this.sortOrder, this.group, this.level, this.createdAt, this.updatedAt, this.cover, this.defineLangeEn});

  Category.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    parentId = json['parent_id'];
    name = json['name'];
    code = json['code'];
    link = json['link'];
    detail = json['detail'];
    type = json['type'];
    status = json['status'];
    sortOrder = json['sort_order'];
    group = json['group'];
    level = json['level'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
    cover = json['cover'];
    defineLangeEn = json['define_lange_en'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['parent_id'] = this.parentId;
    data['name'] = this.name;
    data['code'] = this.code;
    data['link'] = this.link;
    data['detail'] = this.detail;
    data['type'] = this.type;
    data['status'] = this.status;
    data['sort_order'] = this.sortOrder;
    data['group'] = this.group;
    data['level'] = this.level;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    data['cover'] = this.cover;
    data['define_lange_en'] = this.defineLangeEn;
    return data;
  }
}

class Store {
  int? id;
  String? code;
  String? name;
  String? cover;
  String? displayCover;
  String? isActive;
  String? storeOrder;
  String? customerGroupId;
  String? vendorId;
  String? createdAt;
  String? updatedAt;
  String? location;
  String? email;
  String? phone;
  String? mobile;
  String? address;
  String? city;
  String? country;
  String? zipCode;
  String? website;
  String? allowRoute;
  String? excerpt;
  String? detail;
  String? logo;
  String? isFacilities;
  String? parentId;
  String? nation;
  int? province;
  int? district;
  int? subDistrict;
  String? registerType;
  String? facebook;
  String? line;
  String? instagram;
  String? twitter;
  String? recommedOrganiz;
  String? loginDate;

  Store({this.id, this.code, this.name, this.cover, this.displayCover, this.isActive, this.storeOrder, this.customerGroupId, this.vendorId, this.createdAt, this.updatedAt, this.location, this.email, this.phone, this.mobile, this.address, this.city, this.country, this.zipCode, this.website, this.allowRoute, this.excerpt, this.detail, this.logo, this.isFacilities, this.parentId, this.nation, this.province, this.district, this.subDistrict, this.registerType, this.facebook, this.line, this.instagram, this.twitter, this.recommedOrganiz, this.loginDate});

  Store.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    code = json['code'];
    name = json['name'];
    cover = json['cover'];
    displayCover = json['display_cover'];
    isActive = json['is_active'];
    storeOrder = json['store_order'];
    customerGroupId = json['customer_group_id'];
    vendorId = json['vendor_id'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
    location = json['location'];
    email = json['email'];
    phone = json['phone'];
    mobile = json['mobile'];
    address = json['address'];
    city = json['city'];
    country = json['country'];
    zipCode = json['zip_code'];
    website = json['website'];
    allowRoute = json['allow_route'];
    excerpt = json['excerpt'];
    detail = json['detail'];
    logo = json['logo'];
    isFacilities = json['is_facilities'];
    parentId = json['parent_id'];
    nation = json['nation'];
    province = json['province'];
    district = json['district'];
    subDistrict = json['sub_district'];
    registerType = json['register_type'];
    facebook = json['facebook'];
    line = json['line'];
    instagram = json['instagram'];
    twitter = json['twitter'];
    recommedOrganiz = json['recommed_organiz'];
    loginDate = json['login_date'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['code'] = this.code;
    data['name'] = this.name;
    data['cover'] = this.cover;
    data['display_cover'] = this.displayCover;
    data['is_active'] = this.isActive;
    data['store_order'] = this.storeOrder;
    data['customer_group_id'] = this.customerGroupId;
    data['vendor_id'] = this.vendorId;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    data['location'] = this.location;
    data['email'] = this.email;
    data['phone'] = this.phone;
    data['mobile'] = this.mobile;
    data['address'] = this.address;
    data['city'] = this.city;
    data['country'] = this.country;
    data['zip_code'] = this.zipCode;
    data['website'] = this.website;
    data['allow_route'] = this.allowRoute;
    data['excerpt'] = this.excerpt;
    data['detail'] = this.detail;
    data['logo'] = this.logo;
    data['is_facilities'] = this.isFacilities;
    data['parent_id'] = this.parentId;
    data['nation'] = this.nation;
    data['province'] = this.province;
    data['district'] = this.district;
    data['sub_district'] = this.subDistrict;
    data['register_type'] = this.registerType;
    data['facebook'] = this.facebook;
    data['line'] = this.line;
    data['instagram'] = this.instagram;
    data['twitter'] = this.twitter;
    data['recommed_organiz'] = this.recommedOrganiz;
    data['login_date'] = this.loginDate;
    return data;
  }
}

class IntellectualType {
  int? id;
  String? code;
  String? name;
  String? detail;
  // Null? value;
  String? link;
  String? target;
  // Null? icon;
  String? image;
  // Null? class;
  // Null? level;
  String? group;
  String? category;
  String? scope;
  String? status;
  // Null? refSubId;
  // Null? refMainId;
  String? createdAt;
  String? updatedAt;
  String? tbName;
  String? tbId;
  String? coverMobile;
  String? defineLangeEn;
  int? lft;
  int? rgt;
  int? depth;
  int? parentId;

  IntellectualType({this.id, this.code, this.name, this.detail, this.link, this.target, this.image, this.group, this.category, this.scope, this.status, this.createdAt, this.updatedAt, this.tbName, this.tbId, this.coverMobile, this.defineLangeEn, this.lft, this.rgt, this.depth, this.parentId});

  IntellectualType.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  code = json['code'];
  name = json['name'];
  detail = json['detail'];
  // value = json['value'];
  link = json['link'];
  target = json['target'];
  // icon = json['icon'];
  image = json['image'];
  // class = json['class'];
  // level = json['level'];
  group = json['group'];
  category = json['category'];
  scope = json['scope'];
  status = json['status'];
  // refSubId = json['ref_sub_id'];
  // refMainId = json['ref_main_id'];
  createdAt = json['created_at'];
  updatedAt = json['updated_at'];
  tbName = json['tb_name'];
  tbId = json['tb_id'];
  coverMobile = json['cover_mobile'];
  defineLangeEn = json['define_lange_en'];
  lft = json['lft'];
  rgt = json['rgt'];
  depth = json['depth'];
  parentId = json['parent_id'];
  }

  Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['id'] = this.id;
  data['code'] = this.code;
  data['name'] = this.name;
  data['detail'] = this.detail;
  // data['value'] = this.value;
  data['link'] = this.link;
  data['target'] = this.target;
  // data['icon'] = this.icon;
  data['image'] = this.image;
  // data['class'] = this.class;
  // data['level'] = this.level;
  data['group'] = this.group;
  data['category'] = this.category;
  data['scope'] = this.scope;
  data['status'] = this.status;
  // data['ref_sub_id'] = this.refSubId;
  // data['ref_main_id'] = this.refMainId;
  data['created_at'] = this.createdAt;
  data['updated_at'] = this.updatedAt;
  data['tb_name'] = this.tbName;
  data['tb_id'] = this.tbId;
  data['cover_mobile'] = this.coverMobile;
  data['define_lange_en'] = this.defineLangeEn;
  data['lft'] = this.lft;
  data['rgt'] = this.rgt;
  data['depth'] = this.depth;
  data['parent_id'] = this.parentId;
  return data;
  }
}

class Images {
  String? targetLink;

  Images({this.targetLink});

  Images.fromJson(Map<String, dynamic> json) {
    targetLink = json['target_link'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['target_link'] = this.targetLink;
    return data;
  }
}

class RelateData {
  int? id;
  String? urlCode;
  String? name;
  String? cover;

  RelateData({this.id, this.urlCode, this.name, this.cover});

  RelateData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    urlCode = json['url_code'];
    name = json['name'];
    cover = json['cover'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['url_code'] = this.urlCode;
    data['name'] = this.name;
    data['cover'] = this.cover;
    return data;
  }
}
