/* Options: Date: 2025-12-06 13:33:38 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://etc-api.vsmlab.vn //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: PendingAccessRequests.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class PagingRequest implements IConvertible { int? page; int? limit; PagingRequest({this.page,this.limit}); PagingRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { page = json['page']; limit = json['limit']; return this; } Map toJson() => { 'page': page, 'limit': limit }; getTypeName() => "PagingRequest"; TypeContext? context = _ctx; } enum DocumentApprovalStatus { Pending, Approved, Rejected, } enum DocumentAccessPermissions { Read, Write, GrantRead, } class DocumentAccessRequest implements IConvertible { int? id; int? documentId; int? requestedBy; DocumentAccessPermissions? requestPermission; DocumentApprovalStatus? status; DateTime? createdDate; int? approvedBy; DateTime? approvedDate; String? note; String? comment; DateTime? dueDate; DocumentAccessRequest({this.id,this.documentId,this.requestedBy,this.requestPermission,this.status,this.createdDate,this.approvedBy,this.approvedDate,this.note,this.comment,this.dueDate}); DocumentAccessRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; documentId = json['documentId']; requestedBy = json['requestedBy']; requestPermission = JsonConverters.fromJson(json['requestPermission'],'DocumentAccessPermissions',context!); status = JsonConverters.fromJson(json['status'],'DocumentApprovalStatus',context!); createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!); approvedBy = json['approvedBy']; approvedDate = JsonConverters.fromJson(json['approvedDate'],'DateTime',context!); note = json['note']; comment = json['comment']; dueDate = JsonConverters.fromJson(json['dueDate'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'documentId': documentId, 'requestedBy': requestedBy, 'requestPermission': JsonConverters.toJson(requestPermission,'DocumentAccessPermissions',context!), 'status': JsonConverters.toJson(status,'DocumentApprovalStatus',context!), 'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!), 'approvedBy': approvedBy, 'approvedDate': JsonConverters.toJson(approvedDate,'DateTime',context!), 'note': note, 'comment': comment, 'dueDate': JsonConverters.toJson(dueDate,'DateTime',context!) }; getTypeName() => "DocumentAccessRequest"; TypeContext? context = _ctx; } class DocumentAccessRequestView extends DocumentAccessRequest implements IConvertible { String? approvedByName; String? requestedName; String? documentTitle; DocumentAccessRequestView({this.approvedByName,this.requestedName,this.documentTitle}); DocumentAccessRequestView.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); approvedByName = json['approvedByName']; requestedName = json['requestedName']; documentTitle = json['documentTitle']; return this; } Map toJson() => super.toJson()..addAll({ 'approvedByName': approvedByName, 'requestedName': requestedName, 'documentTitle': documentTitle }); getTypeName() => "DocumentAccessRequestView"; TypeContext? context = _ctx; } class PendingAccessResponse implements IConvertible { int? total; int? code; String? message; List? requests; PendingAccessResponse({this.total,this.code,this.message,this.requests}); PendingAccessResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { total = json['total']; code = json['code']; message = json['message']; requests = JsonConverters.fromJson(json['requests'],'List',context!); return this; } Map toJson() => { 'total': total, 'code': code, 'message': message, 'requests': JsonConverters.toJson(requests,'List',context!) }; getTypeName() => "PendingAccessResponse"; TypeContext? context = _ctx; } // @Route("/document-permission/Pending-Access-Requests", "GET") class PendingAccessRequests extends PagingRequest implements IReturn, IConvertible, IGet { DocumentApprovalStatus? status; PendingAccessRequests({this.status}); PendingAccessRequests.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); status = JsonConverters.fromJson(json['status'],'DocumentApprovalStatus',context!); return this; } Map toJson() => super.toJson()..addAll({ 'status': JsonConverters.toJson(status,'DocumentApprovalStatus',context!) }); createResponse() => PendingAccessResponse(); getResponseTypeName() => "PendingAccessResponse"; getTypeName() => "PendingAccessRequests"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: { 'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()), 'DocumentApprovalStatus': TypeInfo(TypeOf.Enum, enumValues:DocumentApprovalStatus.values), 'DocumentAccessPermissions': TypeInfo(TypeOf.Enum, enumValues:DocumentAccessPermissions.values), 'DocumentAccessRequest': TypeInfo(TypeOf.Class, create:() => DocumentAccessRequest()), 'DocumentAccessRequestView': TypeInfo(TypeOf.Class, create:() => DocumentAccessRequestView()), 'PendingAccessResponse': TypeInfo(TypeOf.Class, create:() => PendingAccessResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'PendingAccessRequests': TypeInfo(TypeOf.Class, create:() => PendingAccessRequests()), });