/* Options: Date: 2026-05-09 19:51:08 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://chienbinhdevias-admin-api-sandbox.adnx.vn //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateOrUpdatePostRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class BaseResponse implements IResponseRequest, IConvertible { int? code; String? message; Post? data; BaseResponse({this.code,this.message,this.data}); BaseResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { code = json['code']; message = json['message']; data = JsonConverters.fromJson(json['data'],'Post',context!); return this; } Map toJson() => { 'code': code, 'message': message, 'data': JsonConverters.toJson(data,'Post',context!) }; getTypeName() => "BaseResponse<$Post>"; TypeContext? context = _ctx; } // @Route("/posts", "POST") class CreateOrUpdatePostRequest implements IReturn>, IConvertible, IPost { int? id; String? title; String? slug; String? description; String? body; String? imageUrl; int? categoryId; bool? isPublished; DateTime? publishedDate; CreateOrUpdatePostRequest({this.id,this.title,this.slug,this.description,this.body,this.imageUrl,this.categoryId,this.isPublished,this.publishedDate}); CreateOrUpdatePostRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; title = json['title']; slug = json['slug']; description = json['description']; body = json['body']; imageUrl = json['imageUrl']; categoryId = json['categoryId']; isPublished = json['isPublished']; publishedDate = JsonConverters.fromJson(json['publishedDate'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'title': title, 'slug': slug, 'description': description, 'body': body, 'imageUrl': imageUrl, 'categoryId': categoryId, 'isPublished': isPublished, 'publishedDate': JsonConverters.toJson(publishedDate,'DateTime',context!) }; createResponse() => BaseResponse(); getResponseTypeName() => "BaseResponse"; getTypeName() => "CreateOrUpdatePostRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'chienbinhdevias_admin_api_sandbox.adnx.vn', types: { 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'Post': TypeInfo(TypeOf.Class, create:() => Post()), 'CreateOrUpdatePostRequest': TypeInfo(TypeOf.Class, create:() => CreateOrUpdatePostRequest()), });