/* Options: Date: 2026-04-19 19:20:15 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://qlcn-api.vsmlab.vn //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetTemplateByIdRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class DocumentElement implements IConvertible { int? id; int? templateId; // @required() String? elementKey; // @required() String? tag; int? parentId; // @required() String? title; String? description; // @required() String? dataType; String? templateType; int? orderIndex; bool? isRequired; DocumentElement({this.id,this.templateId,this.elementKey,this.tag,this.parentId,this.title,this.description,this.dataType,this.templateType,this.orderIndex,this.isRequired}); DocumentElement.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; templateId = json['templateId']; elementKey = json['elementKey']; tag = json['tag']; parentId = json['parentId']; title = json['title']; description = json['description']; dataType = json['dataType']; templateType = json['templateType']; orderIndex = json['orderIndex']; isRequired = json['isRequired']; return this; } Map toJson() => { 'id': id, 'templateId': templateId, 'elementKey': elementKey, 'tag': tag, 'parentId': parentId, 'title': title, 'description': description, 'dataType': dataType, 'templateType': templateType, 'orderIndex': orderIndex, 'isRequired': isRequired }; getTypeName() => "DocumentElement"; TypeContext? context = _ctx; } class DocumentElementDto extends DocumentElement implements IConvertible { List? children; DocumentElementDto({this.children}); DocumentElementDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); children = JsonConverters.fromJson(json['children'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'children': JsonConverters.toJson(children,'List',context!) }); getTypeName() => "DocumentElementDto"; TypeContext? context = _ctx; } class DocumentTemplate implements IConvertible { int? id; // @required() String? title; String? description; bool? isActive; String? fileKey; String? fileUrl; String? fileName; int? fileSize; DocumentTemplate({this.id,this.title,this.description,this.isActive,this.fileKey,this.fileUrl,this.fileName,this.fileSize}); DocumentTemplate.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; title = json['title']; description = json['description']; isActive = json['isActive']; fileKey = json['fileKey']; fileUrl = json['fileUrl']; fileName = json['fileName']; fileSize = json['fileSize']; return this; } Map toJson() => { 'id': id, 'title': title, 'description': description, 'isActive': isActive, 'fileKey': fileKey, 'fileUrl': fileUrl, 'fileName': fileName, 'fileSize': fileSize }; getTypeName() => "DocumentTemplate"; TypeContext? context = _ctx; } class DocumentTemplateDto extends DocumentTemplate implements IConvertible { List? elements; DocumentTemplateDto({this.elements}); DocumentTemplateDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); elements = JsonConverters.fromJson(json['elements'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'elements': JsonConverters.toJson(elements,'List',context!) }); getTypeName() => "DocumentTemplateDto"; TypeContext? context = _ctx; } class DocumentTemplateResponse implements IConvertible { DocumentTemplateDto? template; int? insertedId; int? code; String? message; DocumentTemplateResponse({this.template,this.insertedId,this.code,this.message}); DocumentTemplateResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { template = JsonConverters.fromJson(json['template'],'DocumentTemplateDto',context!); insertedId = json['insertedId']; code = json['code']; message = json['message']; return this; } Map toJson() => { 'template': JsonConverters.toJson(template,'DocumentTemplateDto',context!), 'insertedId': insertedId, 'code': code, 'message': message }; getTypeName() => "DocumentTemplateResponse"; TypeContext? context = _ctx; } // @Route("/document-template", "GET") class GetTemplateByIdRequest implements IReturn, IConvertible, IGet { int? id; GetTemplateByIdRequest({this.id}); GetTemplateByIdRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; return this; } Map toJson() => { 'id': id }; createResponse() => DocumentTemplateResponse(); getResponseTypeName() => "DocumentTemplateResponse"; getTypeName() => "GetTemplateByIdRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'qlcn_api.vsmlab.vn', types: { 'DocumentElement': TypeInfo(TypeOf.Class, create:() => DocumentElement()), 'DocumentElementDto': TypeInfo(TypeOf.Class, create:() => DocumentElementDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'DocumentTemplate': TypeInfo(TypeOf.Class, create:() => DocumentTemplate()), 'DocumentTemplateDto': TypeInfo(TypeOf.Class, create:() => DocumentTemplateDto()), 'DocumentTemplateResponse': TypeInfo(TypeOf.Class, create:() => DocumentTemplateResponse()), 'GetTemplateByIdRequest': TypeInfo(TypeOf.Class, create:() => GetTemplateByIdRequest()), });