/* Options: Date: 2025-12-06 13:06:09 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: CreateCategoryRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum CategoryTypes { Department, PartyGroup, DocGroup, DocType, IssuingAgency, Status, Subjects, Workflow, } class CreateCategoryModel implements IConvertible { String? name; String? description; CategoryTypes? type; bool? isParty; // @ignore() List? childList; CreateCategoryModel({this.name,this.description,this.type,this.isParty,this.childList}); CreateCategoryModel.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; description = json['description']; type = JsonConverters.fromJson(json['type'],'CategoryTypes',context!); isParty = json['isParty']; childList = JsonConverters.fromJson(json['childList'],'List',context!); return this; } Map toJson() => { 'name': name, 'description': description, 'type': JsonConverters.toJson(type,'CategoryTypes',context!), 'isParty': isParty, 'childList': JsonConverters.toJson(childList,'List',context!) }; getTypeName() => "CreateCategoryModel"; TypeContext? context = _ctx; } abstract class IResponseRequest { int? code; String? message; } class CreateCategoryResponse implements IResponseRequest, IConvertible { int? id; int? code; String? message; CreateCategoryResponse({this.id,this.code,this.message}); CreateCategoryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; code = json['code']; message = json['message']; return this; } Map toJson() => { 'id': id, 'code': code, 'message': message }; getTypeName() => "CreateCategoryResponse"; TypeContext? context = _ctx; } // @Route("/category/create", "POST") class CreateCategoryRequest extends CreateCategoryModel implements IReturn, IConvertible, IPost { CreateCategoryRequest(); CreateCategoryRequest.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => CreateCategoryResponse(); getResponseTypeName() => "CreateCategoryResponse"; getTypeName() => "CreateCategoryRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: { 'CategoryTypes': TypeInfo(TypeOf.Enum, enumValues:CategoryTypes.values), 'CreateCategoryModel': TypeInfo(TypeOf.Class, create:() => CreateCategoryModel()), 'IResponseRequest': TypeInfo(TypeOf.Interface), 'CreateCategoryResponse': TypeInfo(TypeOf.Class, create:() => CreateCategoryResponse()), 'CreateCategoryRequest': TypeInfo(TypeOf.Class, create:() => CreateCategoryRequest()), });