/* Options: Date: 2025-12-06 13:35:55 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: GetDepartmentMembers.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class PagingRequest implements IConvertible { int? page; int? limit; PagingRequest({this.page,this.limit}); PagingRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { page = json['page']; limit = json['limit']; return this; } Map toJson() => { 'page': page, 'limit': limit }; getTypeName() => "PagingRequest"; 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 AllUserResponse implements IConvertible { List? users; int? code; String? message; int? totalCount; AllUserResponse({this.users,this.code,this.message,this.totalCount}); AllUserResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { users = JsonConverters.fromJson(json['users'],'List',context!); code = json['code']; message = json['message']; totalCount = json['totalCount']; return this; } Map toJson() => { 'users': JsonConverters.toJson(users,'List',context!), 'code': code, 'message': message, 'totalCount': totalCount }; getTypeName() => "AllUserResponse"; TypeContext? context = _ctx; } class BaseResponse implements IResponseRequest, IConvertible { int? code; String? message; AllUserResponse? 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'],'AllUserResponse',context!); return this; } Map toJson() => { 'code': code, 'message': message, 'data': JsonConverters.toJson(data,'AllUserResponse',context!) }; getTypeName() => "BaseResponse<$AllUserResponse>"; TypeContext? context = _ctx; } /** * Lấy tất cả người dùng theo phòng ban hiện tại của trưởng phòng */ // @Route("/users/GetDepartmentMembers", "Get") class GetDepartmentMembers extends PagingRequest implements IReturn>, IConvertible, IGet { String? userName; GetDepartmentMembers({this.userName}); GetDepartmentMembers.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); userName = json['userName']; return this; } Map toJson() => super.toJson()..addAll({ 'userName': userName }); createResponse() => BaseResponse(); getResponseTypeName() => "BaseResponse"; getTypeName() => "GetDepartmentMembers"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: { 'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()), 'UserLogin': TypeInfo(TypeOf.Class, create:() => UserLogin()), 'UserProfile': TypeInfo(TypeOf.Class, create:() => UserProfile()), 'AllUserResponse': TypeInfo(TypeOf.Class, create:() => AllUserResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'GetDepartmentMembers': TypeInfo(TypeOf.Class, create:() => GetDepartmentMembers()), });