Initial commit: Penyerahan final Source code Tugas Akhir
This commit is contained in:
48
lib/models/certificate_model.dart
Normal file
48
lib/models/certificate_model.dart
Normal file
@ -0,0 +1,48 @@
|
||||
class CertificateModel {
|
||||
final String? idPayment;
|
||||
final String? name;
|
||||
final String? title;
|
||||
final int? finishDate;
|
||||
final String? certificateNo;
|
||||
|
||||
CertificateModel({
|
||||
this.idPayment,
|
||||
this.name,
|
||||
this.title,
|
||||
this.finishDate,
|
||||
required this.certificateNo,
|
||||
});
|
||||
|
||||
factory CertificateModel.fromJson(Map<String, dynamic> json) =>
|
||||
CertificateModel(
|
||||
name: json['name'],
|
||||
title: json['title'],
|
||||
finishDate: json['finish_date'],
|
||||
certificateNo: json['certificate_no'],
|
||||
idPayment: json['id_enrol'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id_enrol': idPayment,
|
||||
'name': name,
|
||||
'title': title,
|
||||
'finishDate': finishDate,
|
||||
'certificate_no': certificateNo,
|
||||
};
|
||||
}
|
||||
|
||||
class CertificateNo {
|
||||
CertificateNo({
|
||||
this.idPayment,
|
||||
});
|
||||
|
||||
String? idPayment;
|
||||
|
||||
factory CertificateNo.fromJson(Map<String, dynamic> json) => CertificateNo(
|
||||
idPayment: json["id_payment"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id_payment": idPayment,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user