first commit
This commit is contained in:
60
lib/model/branch_model.dart
Normal file
60
lib/model/branch_model.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
class BranchModel {
|
||||
String? mBranchID;
|
||||
String? mBranchCode;
|
||||
String? mBranchCodeLab;
|
||||
String? mBranchName;
|
||||
String? mBranchAddress;
|
||||
String? mBranchIsActive;
|
||||
String? mBranchCreated;
|
||||
String? mBranchCreatedUserID;
|
||||
String? mBranchLastUpdated;
|
||||
String? mBranchLastUpdatedUserID;
|
||||
String? mBranchDeleted;
|
||||
String? mBranchDeletedUserID;
|
||||
|
||||
BranchModel(
|
||||
{this.mBranchID,
|
||||
this.mBranchCode,
|
||||
this.mBranchCodeLab,
|
||||
this.mBranchName,
|
||||
this.mBranchAddress,
|
||||
this.mBranchIsActive,
|
||||
this.mBranchCreated,
|
||||
this.mBranchCreatedUserID,
|
||||
this.mBranchLastUpdated,
|
||||
this.mBranchLastUpdatedUserID,
|
||||
this.mBranchDeleted,
|
||||
this.mBranchDeletedUserID});
|
||||
|
||||
BranchModel.fromJson(Map<String, dynamic> json) {
|
||||
mBranchID = json['M_BranchID'];
|
||||
mBranchCode = json['M_BranchCode'];
|
||||
mBranchCodeLab = json['M_BranchCodeLab'];
|
||||
mBranchName = json['M_BranchName'];
|
||||
mBranchAddress = json['M_BranchAddress'];
|
||||
mBranchIsActive = json['M_BranchIsActive'];
|
||||
mBranchCreated = json['M_BranchCreated'];
|
||||
mBranchCreatedUserID = json['M_BranchCreatedUserID'];
|
||||
mBranchLastUpdated = json['M_BranchLastUpdated'];
|
||||
mBranchLastUpdatedUserID = json['M_BranchLastUpdatedUserID'];
|
||||
mBranchDeleted = json['M_BranchDeleted'];
|
||||
mBranchDeletedUserID = json['M_BranchDeletedUserID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['M_BranchID'] = this.mBranchID;
|
||||
data['M_BranchCode'] = this.mBranchCode;
|
||||
data['M_BranchCodeLab'] = this.mBranchCodeLab;
|
||||
data['M_BranchName'] = this.mBranchName;
|
||||
data['M_BranchAddress'] = this.mBranchAddress;
|
||||
data['M_BranchIsActive'] = this.mBranchIsActive;
|
||||
data['M_BranchCreated'] = this.mBranchCreated;
|
||||
data['M_BranchCreatedUserID'] = this.mBranchCreatedUserID;
|
||||
data['M_BranchLastUpdated'] = this.mBranchLastUpdated;
|
||||
data['M_BranchLastUpdatedUserID'] = this.mBranchLastUpdatedUserID;
|
||||
data['M_BranchDeleted'] = this.mBranchDeleted;
|
||||
data['M_BranchDeletedUserID'] = this.mBranchDeletedUserID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
70
lib/model/counter_model.dart
Normal file
70
lib/model/counter_model.dart
Normal file
@@ -0,0 +1,70 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class Counter extends Equatable {
|
||||
// int id;
|
||||
// String name;
|
||||
// String code;
|
||||
// bool value;
|
||||
// int priority;
|
||||
// String isConsultDoctor;
|
||||
// String doctorName;
|
||||
// String? img;
|
||||
int counterID;
|
||||
String? counterCode;
|
||||
String? counterIP;
|
||||
String? counterIsDedicated;
|
||||
String? counterLocationID;
|
||||
String? counterMaxQueue;
|
||||
String? counterIsActive;
|
||||
String? locationID;
|
||||
String? locationName;
|
||||
String? serviceID;
|
||||
bool value;
|
||||
|
||||
Counter({
|
||||
// required this.name,
|
||||
// required this.id,
|
||||
// required this.priority,
|
||||
// required this.isConsultDoctor,
|
||||
// this.doctorName = '',
|
||||
// this.value = false,
|
||||
// this.img,
|
||||
// required this.code
|
||||
required this.counterCode,
|
||||
required this.counterID,
|
||||
required this.counterIP,
|
||||
required this.counterIsDedicated,
|
||||
required this.counterMaxQueue,
|
||||
required this.counterIsActive,
|
||||
required this.locationID,
|
||||
required this.locationName,
|
||||
required this.serviceID,
|
||||
this.value = false,
|
||||
});
|
||||
Counter.fromJson(Map<String, dynamic> json)
|
||||
: counterID = int.parse(json['counterID']),
|
||||
counterCode = json['counterCode'].toString(),
|
||||
counterIP = json['counterIP'].toString(),
|
||||
value = false,
|
||||
counterIsDedicated = json['counterIsDedicated'].toString(),
|
||||
counterMaxQueue = json['counterMaxQueue'].toString(),
|
||||
locationID = json['locationID'].toString(),
|
||||
locationName = json['locationName'].toString(),
|
||||
serviceID = json['serviceID'].toString(),
|
||||
counterIsActive = json['counterIsActive'].toString();
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'counterID': counterID,
|
||||
'counterCode': counterCode,
|
||||
'counterIP': counterIP,
|
||||
'counterIsDedicated': counterIsDedicated,
|
||||
'counterMaxQueue': counterMaxQueue,
|
||||
'counterIsActive': counterIsActive,
|
||||
'locationID': locationID,
|
||||
'locationName': locationName,
|
||||
'serviceID': serviceID,
|
||||
'value': value
|
||||
};
|
||||
@override
|
||||
List<Object?> get props => [counterID];
|
||||
}
|
||||
161
lib/model/display_counter_dedicated_modelv2.dart
Normal file
161
lib/model/display_counter_dedicated_modelv2.dart
Normal file
@@ -0,0 +1,161 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class DisplayCounterDedicatedModelV2 extends Equatable {
|
||||
late List<NotServed> notServed;
|
||||
late List<Served> served;
|
||||
late List<Call> call;
|
||||
|
||||
DisplayCounterDedicatedModelV2(
|
||||
{required this.notServed, required this.served, required this.call});
|
||||
|
||||
DisplayCounterDedicatedModelV2.fromJson(Map<String, dynamic> json) {
|
||||
if (json['not_served'] != null) {
|
||||
notServed = [];
|
||||
json['not_served'].forEach((v) {
|
||||
notServed.add(NotServed.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['served'] != null) {
|
||||
served = [];
|
||||
json['served'].forEach((v) {
|
||||
served.add(Served.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['call'] != null) {
|
||||
call = [];
|
||||
json['call'].forEach((v) {
|
||||
call.add(Call.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = Map<String, dynamic>();
|
||||
if (this.notServed != null) {
|
||||
data['not_served'] = this.notServed.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.served != null) {
|
||||
data['served'] = this.served.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [notServed, served];
|
||||
}
|
||||
|
||||
class NotServed extends Equatable {
|
||||
late String queueID;
|
||||
late String statusID;
|
||||
late String queueNumber;
|
||||
late String orderStatus;
|
||||
late String skipQueue;
|
||||
|
||||
NotServed(
|
||||
{required this.queueID,
|
||||
required this.statusID,
|
||||
required this.queueNumber,
|
||||
required this.orderStatus,
|
||||
required this.skipQueue});
|
||||
|
||||
NotServed.fromJson(Map<String, dynamic> json) {
|
||||
queueID = json['queueID'];
|
||||
statusID = json['statusID'];
|
||||
queueNumber = json['queueNumber'];
|
||||
orderStatus = json['order_status'];
|
||||
skipQueue = json['skipQueue'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['queueID'] = this.queueID;
|
||||
data['statusID'] = this.statusID;
|
||||
data['queueNumber'] = this.queueNumber;
|
||||
data['order_status'] = this.orderStatus;
|
||||
data['skipQueue'] = this.skipQueue;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [queueID, statusID, queueNumber, orderStatus];
|
||||
}
|
||||
|
||||
class Served extends Equatable {
|
||||
late String queueID;
|
||||
late String statusID;
|
||||
late String queueNumber;
|
||||
late String queueCounterID;
|
||||
late String counterCode;
|
||||
late String orderStatus;
|
||||
|
||||
Served(
|
||||
{required this.queueID,
|
||||
required this.statusID,
|
||||
required this.queueNumber,
|
||||
required this.queueCounterID,
|
||||
required this.counterCode,
|
||||
required this.orderStatus});
|
||||
|
||||
Served.fromJson(Map<String, dynamic> json) {
|
||||
queueID = json['queueID'];
|
||||
statusID = json['statusID'];
|
||||
queueNumber = json['queueNumber'];
|
||||
queueCounterID = json['queueCounterID'];
|
||||
counterCode = json['counterCode'];
|
||||
orderStatus = json['order_status'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['queueID'] = this.queueID;
|
||||
data['statusID'] = this.statusID;
|
||||
data['queueNumber'] = this.queueNumber;
|
||||
data['queueCounterID'] = this.queueCounterID;
|
||||
data['counterCode'] = this.counterCode;
|
||||
data['order_status'] = this.orderStatus;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [queueID, statusID, queueNumber, orderStatus];
|
||||
}
|
||||
|
||||
class Call extends Equatable {
|
||||
late String queueID;
|
||||
late String statusID;
|
||||
late String queueNumber;
|
||||
late String queueCounterID;
|
||||
late String counterCode;
|
||||
late String orderStatus;
|
||||
|
||||
Call(
|
||||
{required this.queueID,
|
||||
required this.statusID,
|
||||
required this.queueNumber,
|
||||
required this.queueCounterID,
|
||||
required this.counterCode,
|
||||
required this.orderStatus});
|
||||
|
||||
Call.fromJson(Map<String, dynamic> json) {
|
||||
queueID = json['queueID'];
|
||||
statusID = json['statusID'];
|
||||
queueNumber = json['queueNumber'];
|
||||
queueCounterID = json['queueCounterID'];
|
||||
counterCode = json['counterCode'];
|
||||
orderStatus = json['order_status'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['queueID'] = this.queueID;
|
||||
data['statusID'] = this.statusID;
|
||||
data['queueNumber'] = this.queueNumber;
|
||||
data['queueCounterID'] = this.queueCounterID;
|
||||
data['counterCode'] = this.counterCode;
|
||||
data['order_status'] = this.orderStatus;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [queueID, statusID, queueNumber, orderStatus];
|
||||
}
|
||||
111
lib/model/display_layanan_model.dart
Normal file
111
lib/model/display_layanan_model.dart
Normal file
@@ -0,0 +1,111 @@
|
||||
class DisplayModel {
|
||||
late List<BelumDilayani> belumDilayani;
|
||||
late List<SedangDilayani> sedangDilayani;
|
||||
|
||||
DisplayModel({
|
||||
required this.belumDilayani,
|
||||
required this.sedangDilayani
|
||||
});
|
||||
|
||||
DisplayModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['belumDilayani'] != null) {
|
||||
belumDilayani = [];
|
||||
json['belumDilayani'].forEach((v) {
|
||||
belumDilayani.add(BelumDilayani.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['sedangDilayani'] != null) {
|
||||
sedangDilayani = [];
|
||||
json['sedangDilayani'].forEach((v) {
|
||||
sedangDilayani.add(SedangDilayani.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = Map<String, dynamic>();
|
||||
if (this.belumDilayani != null) {
|
||||
data['belumDilayani'] =
|
||||
this.belumDilayani.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.sedangDilayani != null) {
|
||||
data['sedangDilayani'] =
|
||||
this.sedangDilayani.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class BelumDilayani {
|
||||
late String queueID;
|
||||
late String statusID;
|
||||
late String queueNumber;
|
||||
late String serviceDoctorName;
|
||||
late String antrianSelanjutnya;
|
||||
late String orderStatus;
|
||||
|
||||
BelumDilayani(
|
||||
{
|
||||
required this.queueID,
|
||||
required this.statusID,
|
||||
required this.queueNumber,
|
||||
required this.serviceDoctorName,
|
||||
required this.antrianSelanjutnya,
|
||||
required this.orderStatus
|
||||
});
|
||||
|
||||
BelumDilayani.fromJson(Map<String, dynamic> json) {
|
||||
queueID = json['queueID'];
|
||||
statusID = json['statusID'];
|
||||
queueNumber = json['queueNumber'];
|
||||
serviceDoctorName = json['serviceDoctorName'];
|
||||
antrianSelanjutnya = json['antrian_selanjutnya'];
|
||||
orderStatus = json['order_status'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = Map<String, dynamic>();
|
||||
data['queueID'] = this.queueID;
|
||||
data['statusID'] = this.statusID;
|
||||
data['queueNumber'] = this.queueNumber;
|
||||
data['serviceDoctorName'] = this.serviceDoctorName;
|
||||
data['antrian_selanjutnya'] = this.antrianSelanjutnya;
|
||||
data['order_status'] = this.orderStatus;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class SedangDilayani {
|
||||
late String queueID;
|
||||
late String queueNumber;
|
||||
late String serviceDoctorName;
|
||||
late String antrianSelanjutnya;
|
||||
late String orderStatus;
|
||||
|
||||
SedangDilayani(
|
||||
{
|
||||
required this.queueID,
|
||||
required this.queueNumber,
|
||||
required this.serviceDoctorName,
|
||||
required this.antrianSelanjutnya,
|
||||
required this.orderStatus
|
||||
});
|
||||
|
||||
SedangDilayani.fromJson(Map<String, dynamic> json) {
|
||||
queueID = json['queueID'];
|
||||
queueNumber = json['queueNumber'];
|
||||
serviceDoctorName = json['serviceDoctorName'];
|
||||
antrianSelanjutnya = json['antrian_selanjutnya'];
|
||||
orderStatus = json['order_status'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = Map<String, dynamic>();
|
||||
data['queueID'] = this.queueID;
|
||||
data['queueNumber'] = this.queueNumber;
|
||||
data['serviceDoctorName'] = this.serviceDoctorName;
|
||||
data['antrian_selanjutnya'] = this.antrianSelanjutnya;
|
||||
data['order_status'] = this.orderStatus;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
18
lib/model/error_msg_model.dart
Normal file
18
lib/model/error_msg_model.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
class ErrorMsgModel {
|
||||
String? title;
|
||||
String? msg;
|
||||
|
||||
ErrorMsgModel({this.title, this.msg});
|
||||
|
||||
ErrorMsgModel.fromJson(Map<String, dynamic> json) {
|
||||
title = json['title'];
|
||||
msg = json['msg'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['title'] = this.title;
|
||||
data['msg'] = this.msg;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
40
lib/model/layanan_dokter.dart
Normal file
40
lib/model/layanan_dokter.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class LayananDokter extends Equatable {
|
||||
int id;
|
||||
String name;
|
||||
String code;
|
||||
bool value;
|
||||
int priority;
|
||||
String isConsultDoctor;
|
||||
String doctorName;
|
||||
String? img;
|
||||
|
||||
LayananDokter(
|
||||
{required this.name,
|
||||
required this.id,
|
||||
required this.priority,
|
||||
required this.isConsultDoctor,
|
||||
this.doctorName = '',
|
||||
this.value = false,
|
||||
this.img,
|
||||
required this.code});
|
||||
LayananDokter.fromJson(Map<String, dynamic> json)
|
||||
: name = (json['serviceName'] as String).replaceAll("</br>", "\n"),
|
||||
code = json['serviceCode'].toString(),
|
||||
priority = int.parse(json['servicePriority']),
|
||||
value = false,
|
||||
isConsultDoctor = json['serviceIsConsultDoctor'].toString(),
|
||||
doctorName = json['serviceDoctorName'].toString(),
|
||||
id = int.parse(json['serviceID']);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'serviceName': name,
|
||||
'serviceID': id,
|
||||
'serviceCode': code,
|
||||
'servicePriority': priority,
|
||||
'value': value
|
||||
};
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
50
lib/model/sampling_location_model.dart
Normal file
50
lib/model/sampling_location_model.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class SamplingLocation extends Equatable {
|
||||
String mLocationID;
|
||||
String mLocationTSampleStationID;
|
||||
String mLocationName;
|
||||
String mLocationPriority;
|
||||
String mLocationIsActive;
|
||||
String mLocationCreated;
|
||||
String mLocationLastUpdated;
|
||||
String tSampleStationName;
|
||||
bool value;
|
||||
|
||||
SamplingLocation(
|
||||
{required this.mLocationID,
|
||||
required this.mLocationTSampleStationID,
|
||||
required this.mLocationName,
|
||||
required this.mLocationPriority,
|
||||
required this.mLocationIsActive,
|
||||
required this.mLocationCreated,
|
||||
required this.mLocationLastUpdated,
|
||||
required this.tSampleStationName,
|
||||
this.value = false});
|
||||
|
||||
SamplingLocation.fromJson(Map<String, dynamic> json)
|
||||
: mLocationID = json['M_LocationID'],
|
||||
mLocationTSampleStationID = json['M_LocationT_SampleStationID'],
|
||||
mLocationName = json['M_LocationName'],
|
||||
mLocationPriority = json['M_LocationPriority'],
|
||||
mLocationIsActive = json['M_LocationIsActive'],
|
||||
mLocationCreated = json['M_LocationCreated'],
|
||||
mLocationLastUpdated = json['M_LocationLastUpdated'],
|
||||
tSampleStationName = json['T_SampleStationName'],
|
||||
value = false;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['M_LocationID'] = this.mLocationID;
|
||||
data['M_LocationT_SampleStationID'] = this.mLocationTSampleStationID;
|
||||
data['M_LocationName'] = this.mLocationName;
|
||||
data['M_LocationPriority'] = this.mLocationPriority;
|
||||
data['M_LocationIsActive'] = this.mLocationIsActive;
|
||||
data['M_LocationCreated'] = this.mLocationCreated;
|
||||
data['M_LocationLastUpdated'] = this.mLocationLastUpdated;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [mLocationID];
|
||||
}
|
||||
75
lib/model/service_model.dart
Normal file
75
lib/model/service_model.dart
Normal file
@@ -0,0 +1,75 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class Layanan extends Equatable {
|
||||
// int id;
|
||||
// String name;
|
||||
// String code;
|
||||
// bool value;
|
||||
// int priority;
|
||||
// String isConsultDoctor;
|
||||
// String doctorName;
|
||||
// String? img;
|
||||
|
||||
int counterID;
|
||||
String? counterCode;
|
||||
String? counterIP;
|
||||
String? counterIsDedicated;
|
||||
String? counterLocationID;
|
||||
String? counterMaxQueue;
|
||||
String? counterIsActive;
|
||||
String? locationID;
|
||||
String? locationName;
|
||||
String? serviceID;
|
||||
bool value;
|
||||
bool sound;
|
||||
|
||||
Layanan({
|
||||
// required this.name,
|
||||
// required this.id,
|
||||
// required this.priority,
|
||||
// required this.isConsultDoctor,
|
||||
// this.doctorName = '',
|
||||
// this.value = false,
|
||||
// this.img,
|
||||
// required this.code
|
||||
|
||||
required this.counterCode,
|
||||
required this.counterID,
|
||||
required this.counterIP,
|
||||
required this.counterIsDedicated,
|
||||
required this.counterMaxQueue,
|
||||
required this.counterIsActive,
|
||||
required this.locationID,
|
||||
required this.locationName,
|
||||
required this.serviceID,
|
||||
this.value = false,
|
||||
this.sound = false,
|
||||
});
|
||||
Layanan.fromJson(Map<String, dynamic> json)
|
||||
: counterID = int.parse(json['counterID']),
|
||||
counterCode = json['counterCode'].toString(),
|
||||
counterIP = json['counterIP'].toString(),
|
||||
value = false,
|
||||
sound = false,
|
||||
counterIsDedicated = json['counterIsDedicated'].toString(),
|
||||
counterMaxQueue = json['counterMaxQueue'].toString(),
|
||||
locationID = json['locationID'].toString(),
|
||||
locationName = json['locationName'].toString(),
|
||||
serviceID = json['serviceID'].toString(),
|
||||
counterIsActive = json['counterIsActive'].toString();
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'counterID': counterID,
|
||||
'counterCode': counterCode,
|
||||
'counterIP': counterIP,
|
||||
'counterIsDedicated': counterIsDedicated,
|
||||
'counterMaxQueue': counterMaxQueue,
|
||||
'counterIsActive': counterIsActive,
|
||||
'locationID':locationID,
|
||||
'locationName': locationName,
|
||||
'value': value,
|
||||
'sound':sound
|
||||
};
|
||||
@override
|
||||
List<Object?> get props => [counterID];
|
||||
}
|
||||
Reference in New Issue
Block a user