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.
269 lines
9.1 KiB
Dart
269 lines
9.1 KiB
Dart
import 'package:test_sa/models/lookup.dart';
|
|
|
|
import 'assigned_fe_user_model.dart';
|
|
import 'loan_attachment_model.dart';
|
|
|
|
class LoanRequestModel {
|
|
String? requestorUserID;
|
|
int? reqNo;
|
|
String? reqCode;
|
|
String? requestorUserName;
|
|
String? requestorUserEmail;
|
|
String? requestorUserIdForDisplay;
|
|
int? requesterUserPositionId;
|
|
String? requesterExtensionNo;
|
|
String? requestorUserMobileNumber;
|
|
int? loanTypeId;
|
|
String? loanTypeName;
|
|
int? siteId;
|
|
String? siteName;
|
|
int? departmentId;
|
|
String? departmentName;
|
|
String? doctorName;
|
|
String? doctorContact;
|
|
String? doctorEmail;
|
|
String? itemDescription;
|
|
String? requestDescription;
|
|
int? assetId;
|
|
String? assetNumber;
|
|
String? assetName;
|
|
String? assetSerialNumber;
|
|
String? model;
|
|
String? manufacturer;
|
|
int? loanPeriodId;
|
|
String? loanPeriodName;
|
|
String? vendorName;
|
|
String? vendorRepName;
|
|
String? vendorContact;
|
|
String? vendorEmail;
|
|
List<LoanAttachmentModel>? loanAttachments;
|
|
int? loanStatusId;
|
|
String? loanStatusName;
|
|
int? loanStatusValue;
|
|
String? installationEDD;
|
|
String? pulloutEDD;
|
|
String? mdUserID;
|
|
MdUser? mdUser;
|
|
String? mesUserID;
|
|
String? mesUser;
|
|
String? assignedFEForInstallationUserID;
|
|
AssignedFEUser? assignedFEForInstallationUser;
|
|
String? assignedFEForPulloutUserID;
|
|
AssignedFEUser? assignedFEForPulloutUser;
|
|
int? cmwoItemId;
|
|
int? installationWOItemId;
|
|
int? pulloutWOItemId;
|
|
int? id;
|
|
String? installationDate;
|
|
String? pulloutDate;
|
|
String? createdBy;
|
|
String? createdDate;
|
|
String? modifiedBy;
|
|
String? modifiedDate;
|
|
|
|
LoanRequestModel(
|
|
{this.requestorUserID,
|
|
this.reqNo,
|
|
this.reqCode,
|
|
this.requestorUserName,
|
|
this.requestorUserEmail,
|
|
this.requestorUserIdForDisplay,
|
|
this.requesterUserPositionId,
|
|
this.requesterExtensionNo,
|
|
this.requestorUserMobileNumber,
|
|
this.loanTypeId,
|
|
this.loanTypeName,
|
|
this.siteId,
|
|
this.siteName,
|
|
this.departmentId,
|
|
this.departmentName,
|
|
this.doctorName,
|
|
this.doctorContact,
|
|
this.doctorEmail,
|
|
this.itemDescription,
|
|
this.requestDescription,
|
|
this.assetId,
|
|
this.assetNumber,
|
|
this.assetName,
|
|
this.assetSerialNumber,
|
|
this.model,
|
|
this.manufacturer,
|
|
this.loanPeriodId,
|
|
this.loanPeriodName,
|
|
this.vendorName,
|
|
this.vendorRepName,
|
|
this.vendorContact,
|
|
this.vendorEmail,
|
|
this.loanAttachments,
|
|
this.loanStatusId,
|
|
this.loanStatusName,
|
|
this.loanStatusValue,
|
|
this.installationEDD,
|
|
this.pulloutEDD,
|
|
this.mdUserID,
|
|
this.mdUser,
|
|
this.mesUserID,
|
|
this.mesUser,
|
|
this.assignedFEForInstallationUserID,
|
|
this.assignedFEForInstallationUser,
|
|
this.assignedFEForPulloutUserID,
|
|
this.assignedFEForPulloutUser,
|
|
this.cmwoItemId,
|
|
this.installationWOItemId,
|
|
this.pulloutWOItemId,
|
|
this.id,
|
|
this.createdBy,
|
|
this.installationDate,
|
|
this.pulloutDate,
|
|
this.createdDate,
|
|
this.modifiedBy,
|
|
this.modifiedDate});
|
|
|
|
LoanRequestModel.fromJson(Map<String, dynamic> json) {
|
|
requestorUserID = json['requestorUserID'];
|
|
reqNo = json['reqNo'];
|
|
reqCode = json['reqCode'];
|
|
requestorUserName = json['requestorUserName'];
|
|
requestorUserEmail = json['requestorUserEmail'];
|
|
requestorUserIdForDisplay = json['requestorUserIdForDisplay'];
|
|
requesterUserPositionId = json['requesterUserPositionId'];
|
|
requesterExtensionNo = json['requesterExtensionNo'];
|
|
requestorUserMobileNumber = json['requestorUserMobileNumber'];
|
|
loanTypeId = json['loanTypeId'];
|
|
loanTypeName = json['loanTypeName'];
|
|
siteId = json['siteId'];
|
|
siteName = json['siteName'];
|
|
departmentId = json['departmentId'];
|
|
departmentName = json['departmentName'];
|
|
doctorName = json['doctorName'];
|
|
doctorContact = json['doctorContact'];
|
|
doctorEmail = json['doctorEmail'];
|
|
itemDescription = json['itemDescription'];
|
|
requestDescription = json['requestDescription'];
|
|
assetId = json['assetId'];
|
|
assetNumber = json['assetNumber'];
|
|
assetName = json['assetName'];
|
|
assetSerialNumber = json['assetSerialNumber'];
|
|
model = json['model'];
|
|
manufacturer = json['manufacturer'];
|
|
loanPeriodId = json['loanPeriodId'];
|
|
loanPeriodName = json['loanPeriodName'];
|
|
vendorName = json['vendorName'];
|
|
vendorRepName = json['vendorRepName'];
|
|
vendorContact = json['vendorContact'];
|
|
vendorEmail = json['vendorEmail'];
|
|
loanAttachments = <LoanAttachmentModel>[];
|
|
if (json['loanAttachments'] != null) {
|
|
loanAttachments = <LoanAttachmentModel>[];
|
|
json['loanAttachments'].forEach((v) {
|
|
loanAttachments!.add(new LoanAttachmentModel.fromJson(v));
|
|
});
|
|
}
|
|
loanStatusId = json['loanStatusId'];
|
|
loanStatusName = json['loanStatusName'];
|
|
loanStatusValue = json['loanStatusValue'];
|
|
installationEDD = json['installationEDD'];
|
|
pulloutEDD = json['pulloutEDD'];
|
|
mdUserID = json['mdUserID'];
|
|
mdUser = json['mdUser'] == null ? null : MdUser.fromJson(json['mdUser']);
|
|
mesUserID = json['mesUserID'];
|
|
mesUser = json['mesUser'];
|
|
assignedFEForInstallationUserID = json['assignedFEForInstallationUserID'];
|
|
assignedFEForInstallationUser = json['assignedFEForInstallationUser'] == null ? null : AssignedFEUser.fromJson(json['assignedFEForInstallationUser']);
|
|
assignedFEForPulloutUserID = json['assignedFEForPulloutUserID'];
|
|
assignedFEForPulloutUser = json['assignedFEForPulloutUser'] == null ? null : AssignedFEUser.fromJson(json['assignedFEForPulloutUser']);
|
|
cmwoItemId = json['cmwoItemId'];
|
|
installationWOItemId = json['installationWOItemId'];
|
|
pulloutWOItemId = json['pulloutWOItemId'];
|
|
id = json['id'];
|
|
installationDate = json['installationDate'];
|
|
pulloutDate = json['pulloutDate'];
|
|
createdBy = json['createdBy'];
|
|
createdDate = json['createdDate'];
|
|
modifiedBy = json['modifiedBy'];
|
|
modifiedDate = json['modifiedDate'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['requestorUserID'] = this.requestorUserID;
|
|
data['reqNo'] = this.reqNo;
|
|
data['reqCode'] = this.reqCode;
|
|
data['requestorUserName'] = this.requestorUserName;
|
|
data['requestorUserEmail'] = this.requestorUserEmail;
|
|
data['requestorUserIdForDisplay'] = this.requestorUserIdForDisplay;
|
|
data['requesterUserPositionId'] = this.requesterUserPositionId;
|
|
data['requesterExtensionNo'] = this.requesterExtensionNo;
|
|
data['requestorUserMobileNumber'] = this.requestorUserMobileNumber;
|
|
data['loanTypeId'] = this.loanTypeId;
|
|
data['loanTypeName'] = this.loanTypeName;
|
|
data['siteId'] = this.siteId;
|
|
data['siteName'] = this.siteName;
|
|
data['departmentId'] = this.departmentId;
|
|
data['departmentName'] = this.departmentName;
|
|
data['doctorName'] = this.doctorName;
|
|
data['doctorContact'] = this.doctorContact;
|
|
data['doctorEmail'] = this.doctorEmail;
|
|
data['itemDescription'] = this.itemDescription;
|
|
data['requestDescription'] = this.requestDescription;
|
|
data['assetId'] = this.assetId;
|
|
data['assetNumber'] = this.assetNumber;
|
|
data['assetName'] = this.assetName;
|
|
data['assetSerialNumber'] = this.assetSerialNumber;
|
|
data['model'] = this.model;
|
|
data['manufacturer'] = this.manufacturer;
|
|
data['loanPeriodId'] = this.loanPeriodId;
|
|
data['loanPeriodName'] = this.loanPeriodName;
|
|
data['vendorName'] = this.vendorName;
|
|
data['vendorRepName'] = this.vendorRepName;
|
|
data['vendorContact'] = this.vendorContact;
|
|
data['vendorEmail'] = this.vendorEmail;
|
|
if (this.loanAttachments != null) {
|
|
data['loanAttachments'] = this.loanAttachments!.map((v) => v.toJson()).toList();
|
|
}
|
|
data['loanStatusId'] = this.loanStatusId;
|
|
data['loanStatusName'] = this.loanStatusName;
|
|
data['loanStatusValue'] = this.loanStatusValue;
|
|
data['installationEDD'] = this.installationEDD;
|
|
data['pulloutEDD'] = this.pulloutEDD;
|
|
data['mdUserID'] = this.mdUserID;
|
|
data['mdUser'] = this.mdUser?.toJson();
|
|
data['mesUserID'] = this.mesUserID;
|
|
data['mesUser'] = this.mesUser;
|
|
data['assignedFEForInstallationUserID'] = this.assignedFEForInstallationUserID;
|
|
data['assignedFEForInstallationUser'] = this.assignedFEForInstallationUser?.toJson();
|
|
data['assignedFEForPulloutUserID'] = this.assignedFEForPulloutUserID;
|
|
data['assignedFEForPulloutUser'] = this.assignedFEForPulloutUser?.toJson();
|
|
data['cmwoItemId'] = this.cmwoItemId;
|
|
data['installationWOItemId'] = this.installationWOItemId;
|
|
data['pulloutWOItemId'] = this.pulloutWOItemId;
|
|
data['id'] = this.id;
|
|
data['installationDate'] = this.installationDate;
|
|
data['pulloutDate'] = this.pulloutDate;
|
|
data['createdBy'] = this.createdBy;
|
|
data['createdDate'] = this.createdDate;
|
|
data['modifiedBy'] = this.modifiedBy;
|
|
data['modifiedDate'] = this.modifiedDate;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class MdUser {
|
|
String? id;
|
|
String? name;
|
|
|
|
MdUser({this.id, this.name});
|
|
|
|
MdUser.fromJson(dynamic json) {
|
|
id = json['id'] ?? '';
|
|
name = json['name'] ?? '';
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['id'] = id;
|
|
map['name'] = name;
|
|
return map;
|
|
}
|
|
}
|