class RiskProfileQuestionAnswerModel {
  String? status;
  int? statusCode;
  String? message;
  List<Data>? data;

  RiskProfileQuestionAnswerModel(
      {this.status, this.statusCode, this.message, this.data});

  RiskProfileQuestionAnswerModel.fromJson(Map<String, dynamic> json) {
    status = json['status'];
    statusCode = json['status_code'];
    message = json['message'];
    if (json['data'] != null) {
      data = <Data>[];
      json['data'].forEach((v) {
        data!.add(Data.fromJson(v));
      });
    }
  }

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

class Data {
  int? id;
  String? question;
  String? isActive;

  String? createdAt;
  String? updatedAt;
  List<Answer>? answer;

  Data(
      {this.id,
      this.question,
      this.isActive,
      this.createdAt,
      this.updatedAt,
      this.answer});

  Data.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    question = json['question'];
    isActive = json['is_active'];

    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
    if (json['answer'] != null) {
      answer = <Answer>[];
      json['answer'].forEach((v) {
        answer!.add(Answer.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['question'] = question;
    data['is_active'] = isActive;

    data['created_at'] = createdAt;
    data['updated_at'] = updatedAt;
    if (answer != null) {
      data['answer'] = answer!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Answer {
  int? id;
  int? questionId;
  String? answer;
  int? points;
  String? isActive;

  String? createdAt;
  String? updatedAt;

  Answer(
      {this.id,
      this.questionId,
      this.answer,
      this.points,
      this.isActive,
      this.createdAt,
      this.updatedAt});

  Answer.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    questionId = json['question_id'];
    answer = json['answer'];
    points = json['points'];
    isActive = json['is_active'];

    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['question_id'] = questionId;
    data['answer'] = answer;
    data['points'] = points;
    data['is_active'] = isActive;

    data['created_at'] = createdAt;
    data['updated_at'] = updatedAt;
    return data;
  }
}
