Revisi constant & model
This commit is contained in:
68
lib/model/approval_model.dart
Normal file
68
lib/model/approval_model.dart
Normal file
@@ -0,0 +1,68 @@
|
||||
class ApprovalModel {
|
||||
String? id;
|
||||
String? name;
|
||||
String? date;
|
||||
String? time;
|
||||
String? typename;
|
||||
String? typeID;
|
||||
String? presensiTypeName;
|
||||
String? presensitypeID;
|
||||
String? address;
|
||||
String? reasonType;
|
||||
String? reasontypeID;
|
||||
String? reasonDescription;
|
||||
String? statusID;
|
||||
String? statusName;
|
||||
|
||||
ApprovalModel(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.date,
|
||||
this.time,
|
||||
this.typename,
|
||||
this.typeID,
|
||||
this.presensiTypeName,
|
||||
this.presensitypeID,
|
||||
this.address,
|
||||
this.reasonType,
|
||||
this.reasontypeID,
|
||||
this.reasonDescription,
|
||||
this.statusID,
|
||||
this.statusName});
|
||||
|
||||
ApprovalModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
date = json['date'];
|
||||
time = json['time'];
|
||||
typename = json['typename'];
|
||||
typeID = json['typeID'];
|
||||
presensiTypeName = json['presensiTypeName'];
|
||||
presensitypeID = json['presensitypeID'];
|
||||
address = json['address'];
|
||||
reasonType = json['reasonType'];
|
||||
reasontypeID = json['reasontypeID'];
|
||||
reasonDescription = json['reasonDescription'];
|
||||
statusID = json['statusID'];
|
||||
statusName = json['statusName'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['date'] = this.date;
|
||||
data['time'] = this.time;
|
||||
data['typename'] = this.typename;
|
||||
data['typeID'] = this.typeID;
|
||||
data['presensiTypeName'] = this.presensiTypeName;
|
||||
data['presensitypeID'] = this.presensitypeID;
|
||||
data['address'] = this.address;
|
||||
data['reasonType'] = this.reasonType;
|
||||
data['reasontypeID'] = this.reasontypeID;
|
||||
data['reasonDescription'] = this.reasonDescription;
|
||||
data['statusID'] = this.statusID;
|
||||
data['statusName'] = this.statusName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user