updates
parent
c65d44ae4d
commit
4fcaea2993
@ -0,0 +1,57 @@
|
||||
class PostParamsModel {
|
||||
num? versionID;
|
||||
int? channel;
|
||||
int? languageID;
|
||||
String? logInTokenID;
|
||||
String? tokenID;
|
||||
String? language;
|
||||
String? ipAddress;
|
||||
String? generalId;
|
||||
String? latitude;
|
||||
String? longitude;
|
||||
String? deviceTypeID;
|
||||
String? patientOutSA;
|
||||
String? sessionID;
|
||||
String? setupID;
|
||||
|
||||
PostParamsModel({this.versionID, this.channel, this.languageID, this.logInTokenID, this.tokenID, this.language, this.ipAddress, this.generalId, this.latitude, this.longitude, this.deviceTypeID});
|
||||
|
||||
PostParamsModel.fromJson(Map<String, dynamic> json) {
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
logInTokenID = json['LogInTokenID'];
|
||||
tokenID = json['TokenID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['versionID'] = this.versionID;
|
||||
data['channel'] = this.channel;
|
||||
data['languageID'] = this.languageID;
|
||||
data['logInTokenID'] = this.logInTokenID ?? "";
|
||||
data['tokenID'] = this.tokenID ?? "";
|
||||
return data;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJsonAfterLogin() {
|
||||
Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['versionID'] = this.versionID;
|
||||
data['channel'] = this.channel;
|
||||
data['languageID'] = this.languageID;
|
||||
data['logInTokenID'] = this.logInTokenID;
|
||||
data['tokenID'] = this.tokenID;
|
||||
return data;
|
||||
}
|
||||
|
||||
String? _LogInTokenID;
|
||||
|
||||
String? get getLogInTokenID => _LogInTokenID ?? logInTokenID;
|
||||
|
||||
set setLogInTokenID(String? value) {
|
||||
logInTokenID = value;
|
||||
_LogInTokenID = value;
|
||||
}
|
||||
|
||||
set setTokenID(String? token) => tokenID = token;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||||
import 'package:http/http.dart';
|
||||
|
||||
import '../../core/consts.dart';
|
||||
import '../api_client.dart';
|
||||
import 'models/response_models/get_patient_last_login_details_response_model.dart';
|
||||
|
||||
class AuthenticationApiClient {
|
||||
static final AuthenticationApiClient _instance = AuthenticationApiClient._internal();
|
||||
|
||||
AuthenticationApiClient._internal();
|
||||
|
||||
factory AuthenticationApiClient() => _instance;
|
||||
|
||||
Future<GetPatientLastLoginDetailsResponseModel> getMultipleLoginUserData(String deviceIMEI) async {
|
||||
GetPatientLastLoginDetailsResponseModel getPatientLastLoginDetailsResponseModel;
|
||||
|
||||
Map<String, dynamic> request = {"IMEI": deviceIMEI};
|
||||
request.addAll(AppState().postParamsJson);
|
||||
String url = ApiConsts.baseUrl + ApiConsts.SELECT_DEVICE_IMEI;
|
||||
Response response = await ApiClient().postJsonForResponse(url, request);
|
||||
|
||||
var json = jsonDecode(response.body);
|
||||
getPatientLastLoginDetailsResponseModel = GetPatientLastLoginDetailsResponseModel.fromJson(json);
|
||||
|
||||
return getPatientLastLoginDetailsResponseModel;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
class GetPatientLastLoginDetailsResponseModel {
|
||||
int? iD;
|
||||
String? iMEI;
|
||||
int? logInType;
|
||||
int? patientID;
|
||||
bool? outSA;
|
||||
String? mobile;
|
||||
String? identificationNo;
|
||||
String? name;
|
||||
String? nameN;
|
||||
String? createdOn;
|
||||
String? editedOn;
|
||||
bool? biometricEnabled;
|
||||
int? patientType;
|
||||
int? preferredLanguage;
|
||||
|
||||
GetPatientLastLoginDetailsResponseModel(
|
||||
{this.iD,
|
||||
this.iMEI,
|
||||
this.logInType,
|
||||
this.patientID,
|
||||
this.outSA,
|
||||
this.mobile,
|
||||
this.identificationNo,
|
||||
this.name,
|
||||
this.nameN,
|
||||
this.createdOn,
|
||||
this.editedOn,
|
||||
this.biometricEnabled,
|
||||
this.patientType,
|
||||
this.preferredLanguage});
|
||||
|
||||
GetPatientLastLoginDetailsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
iD = json['ID'];
|
||||
iMEI = json['IMEI'];
|
||||
logInType = json['LogInType'];
|
||||
patientID = json['PatientID'];
|
||||
outSA = json['OutSA'];
|
||||
mobile = json['Mobile'];
|
||||
identificationNo = json['IdentificationNo'];
|
||||
name = json['Name'];
|
||||
nameN = json['NameN'];
|
||||
createdOn = json['CreatedOn'];
|
||||
editedOn = json['EditedOn'];
|
||||
biometricEnabled = json['BiometricEnabled'];
|
||||
patientType = json['PatientType'];
|
||||
preferredLanguage = json['PreferredLanguage'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ID'] = this.iD;
|
||||
data['IMEI'] = this.iMEI;
|
||||
data['LogInType'] = this.logInType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['OutSA'] = this.outSA;
|
||||
data['Mobile'] = this.mobile;
|
||||
data['IdentificationNo'] = this.identificationNo;
|
||||
data['Name'] = this.name;
|
||||
data['NameN'] = this.nameN;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
data['BiometricEnabled'] = this.biometricEnabled;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PreferredLanguage'] = this.preferredLanguage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue