class PlansModel {
  List<Plans>? plans;

  PlansModel({this.plans});

  PlansModel.fromJson(Map<String, dynamic> json) {
    if (json['plans'] != null) {
      plans = <Plans>[];
      json['plans'].forEach((v) {
        plans!.add(Plans.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (plans != null) {
      data['plans'] = plans!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Plans {
  String? id;
  int? price;
  int? oldPrice;
  int? coins;
  int? freeCoins;
  String? title;
  String? desc;
  String? image;

  Plans(
      {this.id,
      this.price,
      this.coins,
      this.freeCoins,
      this.title,
      this.image,
      this.desc,
      this.oldPrice});

  Plans.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    price = json['price'];
    coins = json['coins'];
    image = json['image'];
    freeCoins = json['free_coins'];
    title = json['title'];
    desc = json['description'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['price'] = price;
    data['coins'] = coins;
    data['free_coins'] = freeCoins;
    data['title'] = title;
    data['image'] = image;
    data['description'] = desc;
    return data;
  }
}
