Initial commit: Penyerahan final Source code Tugas Akhir

This commit is contained in:
ferdiakhh
2025-07-10 19:15:14 +07:00
commit e1f2206b8a
687 changed files with 80132 additions and 0 deletions

View File

@ -0,0 +1,85 @@
class DetailCourseCoupon {
int? status;
bool? error;
List<DataDetailCourseCoupon>? data;
DetailCourseCoupon({this.status, this.error, this.data});
DetailCourseCoupon.fromJson(Map<String, dynamic> json) {
status = json['status'];
error = json['error'];
if (json['data'] != null) {
data = <DataDetailCourseCoupon>[];
json['data'].forEach((v) {
data!.add(new DataDetailCourseCoupon.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 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<String, dynamic> 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<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
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;
}
}