class SubCategoryModel {
  final String subId;
  final String nameSubCategory;

  SubCategoryModel({
    required this.subId,
    required this.nameSubCategory,
  });

  factory SubCategoryModel.fromJson(Map<String, dynamic> json) {
    return SubCategoryModel(
      subId: json['id'],
      nameSubCategory: json['name_subcategory'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'id': subId,
      'name_subcategory': nameSubCategory,
    };
  }
}
