class HelpSupportModel {
  final int? id;
  final String? faqQuestion;
  final String? faqAnswer;
  final int? categoryXid;
  final int? displayOrder;
  final bool? isActive;
  final String? createdAt;
  final String? updatedAt;
  final Category? category;

  HelpSupportModel({
    this.id,
    this.faqQuestion,
    this.faqAnswer,
    this.categoryXid,
    this.displayOrder,
    this.isActive,
    this.createdAt,
    this.updatedAt,
    this.category,
  });

  factory HelpSupportModel.fromJson(Map<String, dynamic> json) => HelpSupportModel(
        id: json["id"],
        faqQuestion: json["faqQuestion"],
        faqAnswer: json["faqAnswer"],
        categoryXid: json["categoryXid"],
        displayOrder: json["displayOrder"],
        isActive: json["isActive"],
        createdAt: json["createdAt"],
        updatedAt: json["updatedAt"],
        category: json["category"] == null ? null : Category.fromJson(json["category"]),
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "faqQuestion": faqQuestion,
        "faqAnswer": faqAnswer,
        "categoryXid": categoryXid,
        "displayOrder": displayOrder,
        "isActive": isActive,
        "createdAt": createdAt,
        "updatedAt": updatedAt,
        "category": category?.toJson(),
      };
}

class Category {
  final int? id;
  final String? categoryName;
  final String? categoryType;
  final int? displayOrder;
  final bool? isActive;
  final String? createdAt;
  final String? updatedAt;

  Category({
    this.id,
    this.categoryName,
    this.categoryType,
    this.displayOrder,
    this.isActive,
    this.createdAt,
    this.updatedAt,
  });

  factory Category.fromJson(Map<String, dynamic> json) => Category(
        id: json["id"],
        categoryName: json["categoryName"],
        categoryType: json["categoryType"],
        displayOrder: json["displayOrder"],
        isActive: json["isActive"],
        createdAt: json["createdAt"],
        updatedAt: json["updatedAt"],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "categoryName": categoryName,
        "categoryType": categoryType,
        "displayOrder": displayOrder,
        "isActive": isActive,
        "createdAt": createdAt,
        "updatedAt": updatedAt,
      };
}
