49 lines
1.0 KiB
Dart
49 lines
1.0 KiB
Dart
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,
|
|
};
|
|
}
|