/* Options: Date: 2026-05-08 19:21:49 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://tanchinhdo-api-sandbox.adnx.vn //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetPostByCategoryRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class PagingRequest implements IConvertible { int? page; int? limit; int? offSet; PagingRequest({this.page,this.limit,this.offSet}); PagingRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { page = json['page']; limit = json['limit']; offSet = json['offSet']; return this; } Map toJson() => { 'page': page, 'limit': limit, 'offSet': offSet }; 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<$PostResponse>"; TypeContext? context = _ctx; } // @Route("/posts/{category}", "GET") class GetPostByCategoryRequest extends PagingRequest implements IReturn>, IConvertible, IGet { String? category; GetPostByCategoryRequest({this.category}); GetPostByCategoryRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); category = json['category']; return this; } Map toJson() => super.toJson()..addAll({ 'category': category }); createResponse() => PageResponse(); getResponseTypeName() => "PageResponse"; getTypeName() => "GetPostByCategoryRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'tanchinhdo_api_sandbox.adnx.vn', types: { 'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()), 'PageResponse': TypeInfo(TypeOf.Class, create:() => PageResponse()), 'Pagination': TypeInfo(TypeOf.Class, create:() => Pagination()), 'GetPostByCategoryRequest': TypeInfo(TypeOf.Class, create:() => GetPostByCategoryRequest()), });