class CheckCertificate {
  int? status;
  bool? error;
  List<CheckCertificateData>? data;

  CheckCertificate({this.status, this.error, this.data});

  CheckCertificate.fromJson(Map<String, dynamic> json) {
    status = json['status'];
    error = json['error'];
    if (json['data'] != null) {
      data = <CheckCertificateData>[];
      json['data'].forEach((v) {
        data!.add(new CheckCertificateData.fromJson(v));
      });
    }
  }

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

class CheckCertificateData {
  String? idPayment;
  String? userId;
  String? courseId;
  String? name;
  String? title;
  dynamic finishDate;
  String? certificateNo;
  int? progress;

  CheckCertificateData({
    this.idPayment,
    this.userId,
    this.courseId,
    this.name,
    this.title,
    this.finishDate,
    this.certificateNo,
    this.progress,
  });

  CheckCertificateData.fromJson(Map<String, dynamic> json) {
    idPayment = json['id_enrol'];
    userId = json['user_id'];
    courseId = json['course_id'];
    name = json['name'];
    title = json['title'];
    finishDate = json['finish_date'];
    certificateNo = json['certificate_no'];
    progress = json['progress'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id_enrol'] = this.idPayment;
    data['user_id'] = this.userId;
    data['course_id'] = this.courseId;
    data['name'] = this.name;
    data['title'] = this.title;
    data['finish_date'] = this.finishDate;
    data['certificate_no'] = this.certificateNo;
    data['progress'] = this.progress;
    return data;
  }
}
