
import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart';

class PackagesCartItemsResponseModel {
  int _quantity;

  set quantity(int value) {
    _quantity = value;
  }

  String _shoppingCartType;
  int _productId;
  PackagesResponseModel _product;
  int _id;

  int get quantity => _quantity;
  String get shoppingCartType => _shoppingCartType;
  int get productId => _productId;
  PackagesResponseModel get product => _product;
  int get id => _id;

  PackagesCartItemsResponseModel({
      int quantity, 
      String shoppingCartType, 
      int productId,
    PackagesResponseModel product,
      int id}){
    _quantity = quantity;
    _shoppingCartType = shoppingCartType;
    _productId = productId;
    _product = product;
    _id = id;
}

  PackagesCartItemsResponseModel.fromJson(dynamic json) {
    _quantity = json["quantity"];
    _shoppingCartType = json["shopping_cart_type"];
    _productId = json["product_id"];
    _product = json["product"] != null ? PackagesResponseModel().fromJson(json["product"]) : null;
    _id = json["id"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["quantity"] = _quantity;
    map["shopping_cart_type"] = _shoppingCartType;
    map["product_id"] = _productId;
    if (_product != null) {
      map["product"] = _product.toJson();
    }
    map["id"] = _id;
    return map;
  }

}

class Images {
  int _id;
  int _pictureId;
  int _position;
  String _src;
  dynamic _attachment;

  int get id => _id;
  int get pictureId => _pictureId;
  int get position => _position;
  String get src => _src;
  dynamic get attachment => _attachment;

  Images({
      int id, 
      int pictureId, 
      int position, 
      String src, 
      dynamic attachment}){
    _id = id;
    _pictureId = pictureId;
    _position = position;
    _src = src;
    _attachment = attachment;
}

  Images.fromJson(dynamic json) {
    _id = json["id"];
    _pictureId = json["picture_id"];
    _position = json["position"];
    _src = json["src"];
    _attachment = json["attachment"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["id"] = _id;
    map["picture_id"] = _pictureId;
    map["position"] = _position;
    map["src"] = _src;
    map["attachment"] = _attachment;
    return map;
  }

}

/// language_id : 1
/// localized_name : "Dermatology testing"

class Localized_names {
  int _languageId;
  String _localizedName;

  int get languageId => _languageId;
  String get localizedName => _localizedName;

  Localized_names({
      int languageId, 
      String localizedName}){
    _languageId = languageId;
    _localizedName = localizedName;
}

  Localized_names.fromJson(dynamic json) {
    _languageId = json["language_id"];
    _localizedName = json["localized_name"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["language_id"] = _languageId;
    map["localized_name"] = _localizedName;
    return map;
  }

}