first commit
This commit is contained in:
18
lib/model/booth.dart
Normal file
18
lib/model/booth.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class Booth extends Equatable {
|
||||
int id;
|
||||
String name;
|
||||
String code;
|
||||
|
||||
Booth({required this.name, required this.id, required this.code});
|
||||
Booth.fromJson(Map<String, dynamic> json)
|
||||
: id = json['id'].runtimeType == int ? json['id'] : int.parse(json['id']),
|
||||
name = json['name'],
|
||||
code = json['code'];
|
||||
|
||||
Map<String, dynamic> toJson() => {'name': name, 'id': id, 'code': code};
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
24
lib/model/cabapility_model.dart
Normal file
24
lib/model/cabapility_model.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
class CapabilityProfileModel {
|
||||
String? key;
|
||||
String? vendor;
|
||||
String? model;
|
||||
String? description;
|
||||
|
||||
CapabilityProfileModel({this.key, this.vendor, this.model, this.description});
|
||||
|
||||
CapabilityProfileModel.fromJson(Map<String, dynamic> json) {
|
||||
key = json['key'];
|
||||
vendor = json['vendor'];
|
||||
model = json['model'];
|
||||
description = json['description'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['key'] = this.key;
|
||||
data['vendor'] = this.vendor;
|
||||
data['model'] = this.model;
|
||||
data['description'] = this.description;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
40
lib/model/layanan.dart
Normal file
40
lib/model/layanan.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
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;
|
||||
|
||||
Layanan(
|
||||
{required this.name,
|
||||
required this.id,
|
||||
required this.priority,
|
||||
required this.isConsultDoctor,
|
||||
this.doctorName = '',
|
||||
this.value = false,
|
||||
this.img,
|
||||
required this.code});
|
||||
Layanan.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,
|
||||
'serviceID': code,
|
||||
'servicePriority': priority,
|
||||
'value': value
|
||||
};
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
46
lib/model/printer_device.dart
Normal file
46
lib/model/printer_device.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class PrinterDev extends Equatable {
|
||||
int id;
|
||||
String deviceName;
|
||||
String? address;
|
||||
String? port;
|
||||
String? vendorId;
|
||||
String? productId;
|
||||
bool? isBle;
|
||||
|
||||
bool? state;
|
||||
|
||||
PrinterDev(
|
||||
{required this.deviceName,
|
||||
required this.id,
|
||||
this.address,
|
||||
this.port,
|
||||
this.state = true,
|
||||
this.vendorId,
|
||||
this.productId,
|
||||
this.isBle = false});
|
||||
|
||||
PrinterDev.fromJson(Map<String, dynamic> json)
|
||||
: deviceName = json['deviceName'],
|
||||
id = json['id'],
|
||||
address = json['address'],
|
||||
port = json['port'],
|
||||
state = json['state'],
|
||||
vendorId = json['vendorId'],
|
||||
productId = json['productId'],
|
||||
isBle = json['this.isBle'];
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'deviceName': deviceName,
|
||||
'address': address,
|
||||
'port': port,
|
||||
'state': state,
|
||||
'vendorId': vendorId,
|
||||
'productId': productId,
|
||||
'isBle': isBle,
|
||||
'id': id
|
||||
};
|
||||
@override
|
||||
List<Object?> get props => [deviceName];
|
||||
}
|
||||
Reference in New Issue
Block a user