/* Options: Date: 2025-12-06 13:31:05 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: SearchCategoryRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum CategoryTypes { Department, PartyGroup, DocGroup, DocType, IssuingAgency, Status, Subjects, Workflow, } class CategoryRequest implements IConvertible { int? id; CategoryTypes? type; String? name; int? parentId; CategoryRequest({this.id,this.type,this.name,this.parentId}); CategoryRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; type = JsonConverters.fromJson(json['type'],'CategoryTypes',context!); name = json['name']; parentId = json['parentId']; return this; } Map toJson() => { 'id': id, 'type': JsonConverters.toJson(type,'CategoryTypes',context!), 'name': name, 'parentId': parentId }; getTypeName() => "CategoryRequest"; TypeContext? context = _ctx; } class UserLogin implements IConvertible { // @required() String? name; UserLogin({this.name}); UserLogin.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; return this; } Map toJson() => { 'name': name }; getTypeName() => "UserLogin"; TypeContext? context = _ctx; } class UserProfile extends UserLogin implements IConvertible { int? id; String? fullName; String? email; int? departmentId; int? partyGroupId; String? avatar; String? telephone; DateTime? birthday; DateTime? createdAt; DateTime? updatedAt; int? failedLoginCount; // @ignore() List? roles; DateTime? lastLoginDate; UserProfile({this.id,this.fullName,this.email,this.departmentId,this.partyGroupId,this.avatar,this.telephone,this.birthday,this.createdAt,this.updatedAt,this.failedLoginCount,this.roles,this.lastLoginDate}); UserProfile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; fullName = json['fullName']; email = json['email']; departmentId = json['departmentId']; partyGroupId = json['partyGroupId']; avatar = json['avatar']; telephone = json['telephone']; birthday = JsonConverters.fromJson(json['birthday'],'DateTime',context!); createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!); updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!); failedLoginCount = json['failedLoginCount']; roles = JsonConverters.fromJson(json['roles'],'List',context!); lastLoginDate = JsonConverters.fromJson(json['lastLoginDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'fullName': fullName, 'email': email, 'departmentId': departmentId, 'partyGroupId': partyGroupId, 'avatar': avatar, 'telephone': telephone, 'birthday': JsonConverters.toJson(birthday,'DateTime',context!), 'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!), 'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!), 'failedLoginCount': failedLoginCount, 'roles': JsonConverters.toJson(roles,'List',context!), 'lastLoginDate': JsonConverters.toJson(lastLoginDate,'DateTime',context!) }); getTypeName() => "UserProfile"; TypeContext? context = _ctx; } class DepartmentReport implements IConvertible { int? departmentId; String? departmentName; int? totalDocuments; DepartmentReport({this.departmentId,this.departmentName,this.totalDocuments}); DepartmentReport.fromJson(Map json) { fromMap(json); } fromMap(Map json) { departmentId = json['departmentId']; departmentName = json['departmentName']; totalDocuments = json['totalDocuments']; return this; } Map toJson() => { 'departmentId': departmentId, 'departmentName': departmentName, 'totalDocuments': totalDocuments }; getTypeName() => "DepartmentReport"; TypeContext? context = _ctx; } class ColumnMeta implements IConvertible { String? key; String? label; ColumnMeta({this.key,this.label}); ColumnMeta.fromJson(Map json) { fromMap(json); } fromMap(Map json) { key = json['key']; label = json['label']; return this; } Map toJson() => { 'key': key, 'label': label }; getTypeName() => "ColumnMeta"; TypeContext? context = _ctx; } class LeftMenuItem implements IConvertible { int? id; String? name; int? count; bool? isParty; int? level1ParentId; int? level2ParentId; int? level; String? type; // @ignore() List? children; LeftMenuItem({this.id,this.name,this.count,this.isParty,this.level1ParentId,this.level2ParentId,this.level,this.type,this.children}); LeftMenuItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; count = json['count']; isParty = json['isParty']; level1ParentId = json['level1ParentId']; level2ParentId = json['level2ParentId']; level = json['level']; type = json['type']; children = JsonConverters.fromJson(json['children'],'List',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'count': count, 'isParty': isParty, 'level1ParentId': level1ParentId, 'level2ParentId': level2ParentId, 'level': level, 'type': type, 'children': JsonConverters.toJson(children,'List',context!) }; getTypeName() => "LeftMenuItem"; TypeContext? context = _ctx; } class SubjectTypeStatistics implements IConvertible { int? subjectId; int? typeId; String? typeName; int? count; SubjectTypeStatistics({this.subjectId,this.typeId,this.typeName,this.count}); SubjectTypeStatistics.fromJson(Map json) { fromMap(json); } fromMap(Map json) { subjectId = json['subjectId']; typeId = json['typeId']; typeName = json['typeName']; count = json['count']; return this; } Map toJson() => { 'subjectId': subjectId, 'typeId': typeId, 'typeName': typeName, 'count': count }; getTypeName() => "SubjectTypeStatistics"; TypeContext? context = _ctx; } class CategoryStatistics implements IConvertible { int? id; String? title; int? count; bool? isParty; CategoryStatistics({this.id,this.title,this.count,this.isParty}); CategoryStatistics.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; title = json['title']; count = json['count']; isParty = json['isParty']; return this; } Map toJson() => { 'id': id, 'title': title, 'count': count, 'isParty': isParty }; getTypeName() => "CategoryStatistics"; TypeContext? context = _ctx; } class BaseResponse implements IResponseRequest, IConvertible { int? code; String? message; List? 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'],'List',context!); return this; } Map toJson() => { 'code': code, 'message': message, 'data': JsonConverters.toJson(data,'List',context!) }; getTypeName() => "BaseResponse<$List`1>"; TypeContext? context = _ctx; } // @Route("/category", "POST") class SearchCategoryRequest extends CategoryRequest implements IReturn>>, IConvertible, IPost { SearchCategoryRequest(); SearchCategoryRequest.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => BaseResponse>(); getResponseTypeName() => "BaseResponse>"; getTypeName() => "SearchCategoryRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: { 'CategoryTypes': TypeInfo(TypeOf.Enum, enumValues:CategoryTypes.values), 'CategoryRequest': TypeInfo(TypeOf.Class, create:() => CategoryRequest()), 'UserLogin': TypeInfo(TypeOf.Class, create:() => UserLogin()), 'UserProfile': TypeInfo(TypeOf.Class, create:() => UserProfile()), 'DepartmentReport': TypeInfo(TypeOf.Class, create:() => DepartmentReport()), 'ColumnMeta': TypeInfo(TypeOf.Class, create:() => ColumnMeta()), 'LeftMenuItem': TypeInfo(TypeOf.Class, create:() => LeftMenuItem()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SubjectTypeStatistics': TypeInfo(TypeOf.Class, create:() => SubjectTypeStatistics()), 'CategoryStatistics': TypeInfo(TypeOf.Class, create:() => CategoryStatistics()), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Category': TypeInfo(TypeOf.Class, create:() => Category()), 'SearchCategoryRequest': TypeInfo(TypeOf.Class, create:() => SearchCategoryRequest()), });