class MyCertificateModel {
  MyCertificateModel({
    this.status,
    this.error,
    required this.data,
  });

  final int? status;
  final bool? error;
  final List<List<DataMyCertificateModel>> data;

  factory MyCertificateModel.fromJson(Map<String, dynamic> json) =>
      MyCertificateModel(
        status: json["status"],
        error: json["error"],
        data: List<List<DataMyCertificateModel>>.from(json["data"].map((x) =>
            List<DataMyCertificateModel>.from(
                x.map((x) => DataMyCertificateModel.fromJson(x))))),
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "error": error,
        "data": List<dynamic>.from(
            data.map((x) => List<dynamic>.from(x.map((x) => x.toJson())))),
      };
}

class DataMyCertificateModel {
  String? courseId;
  String? instructorId;
  String? name;
  String? title;
  String? instructor;
  String? certificateNo;
  int? progress;
  String? fotoProfile;
  String? idPayment;

  DataMyCertificateModel({
    this.courseId,
    this.instructorId,
    this.name,
    this.title,
    this.instructor,
    this.certificateNo,
    this.progress,
    this.fotoProfile,
    this.idPayment,
  });

  DataMyCertificateModel.fromJson(Map<String, dynamic> json) {
    courseId = json['course_id'];
    instructorId = json['instructor_id'];
    name = json['name'];
    title = json['title'];
    instructor = json['instructor'];
    certificateNo = json['certificate_no'];
    progress = json['progress'];
    fotoProfile = json['foto_profile'];
    idPayment = json['id_payment'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['course_id'] = this.courseId;
    data['instructor_id'] = this.instructorId;
    data['name'] = this.name;
    data['title'] = this.title;
    data['instructor'] = this.instructor;
    data['certificate_no'] = this.certificateNo;
    data['progress'] = this.progress;
    data['foto_profile'] = this.fotoProfile;
    data['id_payment'] = this.idPayment;
    return data;
  }
}
