class CheckCertificate { int? status; bool? error; List? data; CheckCertificate({this.status, this.error, this.data}); CheckCertificate.fromJson(Map json) { status = json['status']; error = json['error']; if (json['data'] != null) { data = []; json['data'].forEach((v) { data!.add(new CheckCertificateData.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); 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 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 toJson() { final Map data = new Map(); 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; } }