class DetailCourseCoupon { int? status; bool? error; List? data; DetailCourseCoupon({this.status, this.error, this.data}); DetailCourseCoupon.fromJson(Map json) { status = json['status']; error = json['error']; if (json['data'] != null) { data = []; json['data'].forEach((v) { data!.add(new DataDetailCourseCoupon.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 DataDetailCourseCoupon { String? idCourse; String? typeCoupon; String? value; String? discountFlag; String? courseName; String? instructor; String? fotoProfile; String? thubmnail; String? originalPrice; int? discountPrice; int? finalPrice; DataDetailCourseCoupon( {this.idCourse, this.typeCoupon, this.value, this.discountFlag, this.courseName, this.instructor, this.fotoProfile, this.thubmnail, this.originalPrice, this.discountPrice, this.finalPrice}); DataDetailCourseCoupon.fromJson(Map json) { idCourse = json['id_course']; typeCoupon = json['type_coupon']; value = json['value']; discountFlag = json['discount_flag']; courseName = json['course_name']; instructor = json['instructor']; fotoProfile = json['foto_profile']; thubmnail = json['thubmnail']; originalPrice = json['original_price']; discountPrice = json['discount_price']; finalPrice = json['final_price']; } Map toJson() { final Map data = new Map(); data['id_course'] = this.idCourse; data['type_coupon'] = this.typeCoupon; data['value'] = this.value; data['discount_flag'] = this.discountFlag; data['course_name'] = this.courseName; data['instructor'] = this.instructor; data['foto_profile'] = this.fotoProfile; data['thubmnail'] = this.thubmnail; data['original_price'] = this.originalPrice; data['discount_price'] = this.discountPrice; data['final_price'] = this.finalPrice; return data; } }