first commit
This commit is contained in:
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