/* Options: Date: 2026-04-26 03:42:08 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: SearchEquipmentRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; 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 Equipment implements IConvertible { int? id; // @required() // @StringLength(500) String? name; // @StringLength(1000) String? imageUrl; String? description; // @StringLength(50) String? unit; int? materialTypeId; int? status; bool? isDeleted; DateTime? approvedAt; int? approvedBy; DateTime? createdAt; int? createdBy; DateTime? updatedAt; int? updatedBy; // @ignore() String? materialTypeName; // @ignore() String? createdByName; // @ignore() String? approvedByName; Equipment({this.id,this.name,this.imageUrl,this.description,this.unit,this.materialTypeId,this.status,this.isDeleted,this.approvedAt,this.approvedBy,this.createdAt,this.createdBy,this.updatedAt,this.updatedBy,this.materialTypeName,this.createdByName,this.approvedByName}); Equipment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; imageUrl = json['imageUrl']; description = json['description']; unit = json['unit']; materialTypeId = json['materialTypeId']; status = json['status']; isDeleted = json['isDeleted']; approvedAt = JsonConverters.fromJson(json['approvedAt'],'DateTime',context!); approvedBy = json['approvedBy']; createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!); createdBy = json['createdBy']; updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!); updatedBy = json['updatedBy']; materialTypeName = json['materialTypeName']; createdByName = json['createdByName']; approvedByName = json['approvedByName']; return this; } Map toJson() => { 'id': id, 'name': name, 'imageUrl': imageUrl, 'description': description, 'unit': unit, 'materialTypeId': materialTypeId, 'status': status, 'isDeleted': isDeleted, 'approvedAt': JsonConverters.toJson(approvedAt,'DateTime',context!), 'approvedBy': approvedBy, 'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!), 'createdBy': createdBy, 'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!), 'updatedBy': updatedBy, 'materialTypeName': materialTypeName, 'createdByName': createdByName, 'approvedByName': approvedByName }; getTypeName() => "Equipment"; TypeContext? context = _ctx; } class PageResponse implements IResponseRequest, IConvertible { int? code; String? message; List? data; Pagination? pagination; PageResponse({this.code,this.message,this.data,this.pagination}); PageResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { code = json['code']; message = json['message']; data = JsonConverters.fromJson(json['data'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!); pagination = JsonConverters.fromJson(json['pagination'],'Pagination',context!); return this; } Map toJson() => { 'code': code, 'message': message, 'data': JsonConverters.toJson(data,'List',context!), 'pagination': JsonConverters.toJson(pagination,'Pagination',context!) }; getTypeName() => "PageResponse<$Equipment>"; TypeContext? context = _ctx; } // @Route("/equipment/search", "GET") class SearchEquipmentRequest extends PagingRequest implements IReturn>, IConvertible, IGet { String? name; int? materialTypeId; int? status; bool? mineOnly; SearchEquipmentRequest({this.name,this.materialTypeId,this.status,this.mineOnly}); SearchEquipmentRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); name = json['name']; materialTypeId = json['materialTypeId']; status = json['status']; mineOnly = json['mineOnly']; return this; } Map toJson() => super.toJson()..addAll({ 'name': name, 'materialTypeId': materialTypeId, 'status': status, 'mineOnly': mineOnly }); createResponse() => PageResponse(); getResponseTypeName() => "PageResponse"; getTypeName() => "SearchEquipmentRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: { 'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()), 'Equipment': TypeInfo(TypeOf.Class, create:() => Equipment()), 'PageResponse': TypeInfo(TypeOf.Class, create:() => PageResponse()), 'Pagination': TypeInfo(TypeOf.Class, create:() => Pagination()), 'SearchEquipmentRequest': TypeInfo(TypeOf.Class, create:() => SearchEquipmentRequest()), });