/* Options: Date: 2026-04-30 21:08:48 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: SearchPurchaseHistoryRequest.* //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; } class PageResponse implements IResponseRequest, IConvertible { int? code; String? message; List? data; Pagination? pagination; PageResponse({this.code,this.message,this.data,this.pagination}); PageResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { code = json['code']; message = json['message']; data = JsonConverters.fromJson(json['data'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!); pagination = JsonConverters.fromJson(json['pagination'],'Pagination',context!); return this; } Map toJson() => { 'code': code, 'message': message, 'data': JsonConverters.toJson(data,'List',context!), 'pagination': JsonConverters.toJson(pagination,'Pagination',context!) }; getTypeName() => "PageResponse<$PurchaseHistory>"; TypeContext? context = _ctx; } // @Route("/purchase-history/search", "GET") class SearchPurchaseHistoryRequest extends PagingRequest implements IReturn>, IConvertible, IGet { String? name; int? workflowId; int? equipmentId; int? providerId; DateTime? createdFrom; DateTime? createdTo; bool? onlyMissingEquipment; SearchPurchaseHistoryRequest({this.name,this.workflowId,this.equipmentId,this.providerId,this.createdFrom,this.createdTo,this.onlyMissingEquipment}); SearchPurchaseHistoryRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); name = json['name']; workflowId = json['workflowId']; equipmentId = json['equipmentId']; providerId = json['providerId']; createdFrom = JsonConverters.fromJson(json['createdFrom'],'DateTime',context!); createdTo = JsonConverters.fromJson(json['createdTo'],'DateTime',context!); onlyMissingEquipment = json['onlyMissingEquipment']; return this; } Map toJson() => super.toJson()..addAll({ 'name': name, 'workflowId': workflowId, 'equipmentId': equipmentId, 'providerId': providerId, 'createdFrom': JsonConverters.toJson(createdFrom,'DateTime',context!), 'createdTo': JsonConverters.toJson(createdTo,'DateTime',context!), 'onlyMissingEquipment': onlyMissingEquipment }); createResponse() => PageResponse(); getResponseTypeName() => "PageResponse"; getTypeName() => "SearchPurchaseHistoryRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: { 'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()), 'PageResponse': TypeInfo(TypeOf.Class, create:() => PageResponse()), 'Pagination': TypeInfo(TypeOf.Class, create:() => Pagination()), 'SearchPurchaseHistoryRequest': TypeInfo(TypeOf.Class, create:() => SearchPurchaseHistoryRequest()), });