/* Options: Date: 2025-12-06 13:11:00 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: AuditLogRequest.* //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<$AuditLog>"; TypeContext? context = _ctx; } // @Route("/audits", "GET") class AuditLogRequest extends PagingRequest implements IReturn>, IConvertible, IGet { String? userName; int? userId; int? documentId; String? action; String? description; String? ipAddress; DateTime? startDate; DateTime? endDate; AuditLogRequest({this.userName,this.userId,this.documentId,this.action,this.description,this.ipAddress,this.startDate,this.endDate}); AuditLogRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); userName = json['userName']; userId = json['userId']; documentId = json['documentId']; action = json['action']; description = json['description']; ipAddress = json['ipAddress']; startDate = JsonConverters.fromJson(json['startDate'],'DateTime',context!); endDate = JsonConverters.fromJson(json['endDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'userName': userName, 'userId': userId, 'documentId': documentId, 'action': action, 'description': description, 'ipAddress': ipAddress, 'startDate': JsonConverters.toJson(startDate,'DateTime',context!), 'endDate': JsonConverters.toJson(endDate,'DateTime',context!) }); createResponse() => PageResponse(); getResponseTypeName() => "PageResponse"; getTypeName() => "AuditLogRequest"; 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()), 'AuditLogRequest': TypeInfo(TypeOf.Class, create:() => AuditLogRequest()), });