/* Options: Date: 2026-04-29 05:07:14 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: UpdateProcurementItemRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class ProcurementItem implements IConvertible { int? id; int? batchId; int? departmentId; int? equipmentId; // @required() // @StringLength(500) String? productName; String? technicalSpec; // @StringLength(50) String? unit; int? quantity; String? purpose; String? note; int? approvalStatus; String? approvalNote; DateTime? approvedAt; int? approvedBy; DateTime? createdAt; int? createdBy; DateTime? updatedAt; int? updatedBy; bool? isDeleted; DateTime? deletedAt; int? deletedBy; // @ignore() String? departmentName; // @ignore() String? createdByName; // @ignore() String? approvedByName; ProcurementItem({this.id,this.batchId,this.departmentId,this.equipmentId,this.productName,this.technicalSpec,this.unit,this.quantity,this.purpose,this.note,this.approvalStatus,this.approvalNote,this.approvedAt,this.approvedBy,this.createdAt,this.createdBy,this.updatedAt,this.updatedBy,this.isDeleted,this.deletedAt,this.deletedBy,this.departmentName,this.createdByName,this.approvedByName}); ProcurementItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; batchId = json['batchId']; departmentId = json['departmentId']; equipmentId = json['equipmentId']; productName = json['productName']; technicalSpec = json['technicalSpec']; unit = json['unit']; quantity = json['quantity']; purpose = json['purpose']; note = json['note']; approvalStatus = json['approvalStatus']; approvalNote = json['approvalNote']; 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']; isDeleted = json['isDeleted']; deletedAt = JsonConverters.fromJson(json['deletedAt'],'DateTime',context!); deletedBy = json['deletedBy']; departmentName = json['departmentName']; createdByName = json['createdByName']; approvedByName = json['approvedByName']; return this; } Map toJson() => { 'id': id, 'batchId': batchId, 'departmentId': departmentId, 'equipmentId': equipmentId, 'productName': productName, 'technicalSpec': technicalSpec, 'unit': unit, 'quantity': quantity, 'purpose': purpose, 'note': note, 'approvalStatus': approvalStatus, 'approvalNote': approvalNote, 'approvedAt': JsonConverters.toJson(approvedAt,'DateTime',context!), 'approvedBy': approvedBy, 'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!), 'createdBy': createdBy, 'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!), 'updatedBy': updatedBy, 'isDeleted': isDeleted, 'deletedAt': JsonConverters.toJson(deletedAt,'DateTime',context!), 'deletedBy': deletedBy, 'departmentName': departmentName, 'createdByName': createdByName, 'approvedByName': approvedByName }; getTypeName() => "ProcurementItem"; TypeContext? context = _ctx; } // @Route("/procurement/item/{Id}", "PUT") class UpdateProcurementItemRequest implements IReturn, IConvertible, IPut { int? id; int? equipmentId; String? productName; String? technicalSpec; String? unit; int? quantity; String? purpose; String? note; UpdateProcurementItemRequest({this.id,this.equipmentId,this.productName,this.technicalSpec,this.unit,this.quantity,this.purpose,this.note}); UpdateProcurementItemRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; equipmentId = json['equipmentId']; productName = json['productName']; technicalSpec = json['technicalSpec']; unit = json['unit']; quantity = json['quantity']; purpose = json['purpose']; note = json['note']; return this; } Map toJson() => { 'id': id, 'equipmentId': equipmentId, 'productName': productName, 'technicalSpec': technicalSpec, 'unit': unit, 'quantity': quantity, 'purpose': purpose, 'note': note }; createResponse() => ProcurementItem(); getResponseTypeName() => "ProcurementItem"; getTypeName() => "UpdateProcurementItemRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: { 'ProcurementItem': TypeInfo(TypeOf.Class, create:() => ProcurementItem()), 'UpdateProcurementItemRequest': TypeInfo(TypeOf.Class, create:() => UpdateProcurementItemRequest()), });