revisi + request v 1.01 -> 1.02
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:mitra_corporate/model/user_mou_model.dart';
|
||||
|
||||
class OrderModel {
|
||||
String? orderId;
|
||||
String? orderNumber;
|
||||
@@ -30,6 +32,7 @@ class OrderModel {
|
||||
List<String>? tests;
|
||||
List<String>? paket;
|
||||
List<String>? paketDetail;
|
||||
UserMouModel? mou;
|
||||
|
||||
OrderModel(
|
||||
{this.orderId,
|
||||
@@ -62,6 +65,7 @@ class OrderModel {
|
||||
this.lokasi,
|
||||
this.pekerjaan,
|
||||
this.isQr,
|
||||
this.mou,
|
||||
this.bahan});
|
||||
|
||||
OrderModel.fromJson(Map<String, dynamic> json) {
|
||||
@@ -89,6 +93,7 @@ class OrderModel {
|
||||
lokasi = json['lokasi'];
|
||||
pekerjaan = json['pekerjaan'];
|
||||
isQr = json['is_qr'];
|
||||
mou = UserMouModel.fromJson(json['mou']);
|
||||
// sample = json['sample'].cast<String>();
|
||||
// bahan = json['bahan'].cast<String>();
|
||||
// tests = json['tests'].cast<String>();
|
||||
@@ -185,6 +190,7 @@ class OrderModel {
|
||||
data['pekerjaan'] = pekerjaan;
|
||||
data['noRM'] = noRM;
|
||||
data['is_qr'] = isQr;
|
||||
data['mou'] = mou;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ class RegistrationModel {
|
||||
List<Tests>? tests;
|
||||
List<Specimens>? specimens;
|
||||
List<Bahan>? bahan;
|
||||
String? userMouID;
|
||||
String? total;
|
||||
String? token;
|
||||
|
||||
@@ -17,6 +18,7 @@ class RegistrationModel {
|
||||
this.specimens,
|
||||
this.total,
|
||||
this.bahan,
|
||||
this.userMouID,
|
||||
this.patientId,
|
||||
this.paket,
|
||||
this.orderID,
|
||||
@@ -54,6 +56,7 @@ class RegistrationModel {
|
||||
|
||||
patientId = json['patient_id'];
|
||||
token = json['token'];
|
||||
userMouID = json['userMouID'];
|
||||
orderID = json['orderID'];
|
||||
}
|
||||
|
||||
@@ -77,7 +80,7 @@ class RegistrationModel {
|
||||
data['total'] = total;
|
||||
data['patient_id'] = patientId;
|
||||
data['token'] = token;
|
||||
|
||||
data['userMouID'] = userMouID;
|
||||
data['orderID'] = orderID;
|
||||
return data;
|
||||
}
|
||||
|
||||
28
lib/model/user_mou_model.dart
Normal file
28
lib/model/user_mou_model.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
class UserMouModel {
|
||||
String? userMouID;
|
||||
String? userMouMouID;
|
||||
String? userMouName;
|
||||
String? userMouIsDefault;
|
||||
|
||||
UserMouModel(
|
||||
{this.userMouID,
|
||||
this.userMouName,
|
||||
this.userMouIsDefault,
|
||||
this.userMouMouID});
|
||||
|
||||
UserMouModel.fromJson(Map<String, dynamic> json) {
|
||||
userMouID = json['userMouID'];
|
||||
userMouName = json['userMouName'];
|
||||
userMouIsDefault = json['userMouIsDefault'];
|
||||
userMouMouID = json['userMouMouID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['userMouID'] = this.userMouID;
|
||||
data['userMouName'] = this.userMouName;
|
||||
data['userMouIsDefault'] = this.userMouIsDefault;
|
||||
data['userMouMouID'] = this.userMouMouID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user