You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HMG_QLine/lib/models/global_config_model.dart

181 lines
5.8 KiB
Dart

10 months ago
import 'dart:developer';
10 months ago
import 'dart:ui';
import 'package:hmg_qline/utilities/enums.dart';
import 'package:hmg_qline/utilities/extensions.dart';
class GlobalConfigurationsModel {
int? id;
int? configType;
String? description;
int? counterStart;
int? counterEnd;
10 months ago
int concurrentCallDelaySec = 1;
10 months ago
int? voiceType;
String? voiceTypeText;
LanguageEnum screenLanguageEnum = LanguageEnum.english;
String? screenLanguageText;
TextDirection textDirection = TextDirection.ltr;
LanguageEnum voiceLanguageEnum = LanguageEnum.english;
String? voiceLanguageText;
10 months ago
int screenMaxDisplayPatients = 10;
10 months ago
bool? isNotiReq;
int? prioritySMS;
int? priorityWhatsApp;
int? priorityEmail;
String ticketNoText = "Ticket Number";
String postVoiceText = "Please Visit Counter";
String? roomText;
int? roomNo;
String? counterText;
10 months ago
String? queueNoText;
String? callForText;
String? currentServeText;
String maxText = "";
String minText = "";
String nextPrayerText = "";
String weatherText = "Weather";
String? fajarText;
String? dhuhrText;
String? asarText;
String? maghribText;
String? ishaText;
bool? isActive;
int? createdBy;
String? createdOn;
dynamic editedBy;
dynamic editedOn;
bool isToneReq = false;
bool isVoiceReq = false;
10 months ago
ScreenOrientationEnum orientationTypeEnum = ScreenOrientationEnum.portraitUp;
10 months ago
bool? isTurnOn;
int? waitingAreaType;
int? gender;
bool isWeatherReq = false;
bool isPrayerTimeReq = false;
bool isRssFeedReq = false;
10 months ago
QTypeEnum qTypeEnum = QTypeEnum.lab;
ScreenTypeEnum screenTypeEnum = ScreenTypeEnum.waitingAreaScreen;
10 months ago
int? projectID;
double? projectLatitude;
double? projectLongitude;
int? cityKey;
GlobalConfigurationsModel({
this.id,
this.configType,
this.description,
this.counterStart,
this.counterEnd,
10 months ago
this.concurrentCallDelaySec = 1,
10 months ago
this.voiceType,
this.voiceTypeText,
this.screenLanguageEnum = LanguageEnum.english,
this.screenLanguageText,
this.textDirection = TextDirection.ltr,
this.voiceLanguageEnum = LanguageEnum.english,
this.voiceLanguageText,
10 months ago
this.screenMaxDisplayPatients = 10,
10 months ago
this.isNotiReq,
this.prioritySMS,
this.priorityWhatsApp,
this.priorityEmail,
this.ticketNoText = "Ticket Number",
this.postVoiceText = "Please Visit Counter",
this.roomText,
this.roomNo,
this.counterText,
10 months ago
this.queueNoText,
this.callForText,
this.currentServeText,
this.maxText = "",
this.minText = "",
this.nextPrayerText = "",
this.weatherText = "Weather",
this.fajarText,
this.dhuhrText,
this.asarText,
this.maghribText,
this.ishaText,
this.isActive,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.isToneReq = false,
this.isVoiceReq = false,
10 months ago
this.orientationTypeEnum = ScreenOrientationEnum.portraitUp,
10 months ago
this.isTurnOn,
this.waitingAreaType,
this.gender,
this.isWeatherReq = false,
this.isPrayerTimeReq = false,
this.isRssFeedReq = false,
10 months ago
this.qTypeEnum = QTypeEnum.lab,
this.screenTypeEnum = ScreenTypeEnum.waitingAreaScreen,
10 months ago
this.projectID,
this.projectLatitude,
this.projectLongitude,
this.cityKey,
});
GlobalConfigurationsModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
configType = json['configType'];
description = json['description'];
counterStart = json['counterStart'];
counterEnd = json['counterEnd'];
10 months ago
concurrentCallDelaySec = json['concurrentCallDelaySec'] ?? 1;
10 months ago
voiceType = json['voiceType'];
voiceTypeText = json['voiceTypeText'];
screenLanguageEnum = (json['screenLanguage'] as int).toLanguageEnum();
screenLanguageText = json['screenLanguageText'];
textDirection = json['textDirection'] == 2 ? TextDirection.rtl : TextDirection.ltr;
voiceLanguageEnum = (json['voiceLanguage'] as int).toLanguageEnum();
voiceLanguageText = json['voiceLanguageText'];
10 months ago
screenMaxDisplayPatients = json['screenMaxDisplayPatients'] ?? 10;
10 months ago
isNotiReq = json['isNotiReq'];
prioritySMS = json['prioritySMS'];
priorityWhatsApp = json['priorityWhatsApp'];
priorityEmail = json['priorityEmail'];
ticketNoText = json['ticketNoText'] ?? "Ticket Number";
10 months ago
postVoiceText = json['pleaseVisitCounterText'] ?? "Please Visit Counter";
counterText = json['counterText'];
10 months ago
roomText = json['roomText'];
roomNo = json['roomNo'];
10 months ago
queueNoText = json['queueNoText'];
callForText = json['callForText'];
currentServeText = json['currentServeText'];
maxText = json['maxText'] ?? "";
minText = json['minText'] ?? "";
nextPrayerText = json['nextPrayerText'] ?? "";
weatherText = json['weatherText'] ?? "Weather";
fajarText = json['fajarText'];
dhuhrText = json['dhuhrText'];
asarText = json['asarText'];
maghribText = json['maghribText'];
ishaText = json['ishaText'];
isActive = json['isActive'];
createdBy = json['createdBy'];
createdOn = json['createdOn'];
editedBy = json['editedBy'];
editedOn = json['editedOn'];
isToneReq = json['isToneReq'] ?? false;
isVoiceReq = json['isVoiceReq'] ?? false;
// isToneReq = true;
// isVoiceReq = true;
10 months ago
orientationTypeEnum = ((json['orientationType'] ?? 1) as int).toScreenOrientationEnum();
10 months ago
isTurnOn = json['isTurnOn'];
waitingAreaType = json['waitingAreaType'];
gender = json['gender'];
isWeatherReq = json['isWeatherReq'] ?? false;
isPrayerTimeReq = json['isPrayerTimeReq'] ?? false;
isRssFeedReq = json['isRssFeedReq'] ?? false;
10 months ago
qTypeEnum = (json['qType'] as int).toQTypeEnum();
screenTypeEnum = (json['screenType'] as int).toScreenTypeEnum();
10 months ago
projectID = json['projectID'];
projectLatitude = json['projectLatitude'] == 0 ? 0.0 : json['projectLatitude'];
projectLongitude = json['projectLongitude'] == 0 ? 0.0 : json['projectLongitude'];
10 months ago
cityKey = json['cityKey'];
}
}