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; int? concurrentCallDelaySec; int? voiceType; String? voiceTypeText; LanguageEnum screenLanguageEnum = LanguageEnum.english; String? screenLanguageText; TextDirection textDirection = TextDirection.ltr; LanguageEnum voiceLanguageEnum = LanguageEnum.english; String? voiceLanguageText; int? screenMaxDisplayPatients; bool? isNotiReq; int? prioritySMS; int? priorityWhatsApp; int? priorityEmail; String ticketNoText = "Ticket Number"; String postVoiceText = "Please Visit Counter"; String? roomText; 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; int orientationType = 1; bool? isTurnOn; int? waitingAreaType; int? gender; bool isWeatherReq = false; bool isPrayerTimeReq = false; bool isRssFeedReq = false; int? qType; int? screenType; int? projectID; double? projectLatitude; double? projectLongitude; int? cityKey; GlobalConfigurationsModel({ this.id, this.configType, this.description, this.counterStart, this.counterEnd, this.concurrentCallDelaySec, this.voiceType, this.voiceTypeText, this.screenLanguageEnum = LanguageEnum.english, this.screenLanguageText, this.textDirection = TextDirection.ltr, this.voiceLanguageEnum = LanguageEnum.english, this.voiceLanguageText, this.screenMaxDisplayPatients, this.isNotiReq, this.prioritySMS, this.priorityWhatsApp, this.priorityEmail, this.ticketNoText = "Ticket Number", this.postVoiceText = "Please Visit Counter", this.roomText, 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, this.orientationType = 1, this.isTurnOn, this.waitingAreaType, this.gender, this.isWeatherReq = false, this.isPrayerTimeReq = false, this.isRssFeedReq = false, this.qType, this.screenType, this.projectID, this.projectLatitude, this.projectLongitude, this.cityKey, }); GlobalConfigurationsModel.fromJson(Map json) { id = json['id']; configType = json['configType']; description = json['description']; counterStart = json['counterStart']; counterEnd = json['counterEnd']; concurrentCallDelaySec = json['concurrentCallDelaySec']; 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']; screenMaxDisplayPatients = json['screenMaxDisplayPatients']; isNotiReq = json['isNotiReq']; prioritySMS = json['prioritySMS']; priorityWhatsApp = json['priorityWhatsApp']; priorityEmail = json['priorityEmail']; ticketNoText = json['ticketNoText'] ?? "Ticket Number"; postVoiceText = json['postVoiceText'] ?? "Please Visit Counter"; roomText = json['roomText']; 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; orientationType = json['orientationType'] ?? 1; isTurnOn = json['isTurnOn']; waitingAreaType = json['waitingAreaType']; gender = json['gender']; isWeatherReq = json['isWeatherReq'] ?? false; isPrayerTimeReq = json['isPrayerTimeReq'] ?? false; isRssFeedReq = json['isRssFeedReq'] ?? false; qType = json['qType']; screenType = json['screenType']; projectID = json['projectID']; projectLatitude = json['projectLatitude']; projectLongitude = json['projectLongitude']; cityKey = json['cityKey']; } }