/* Options: Date: 2024-12-22 21:16:06 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: QueryInvoices.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class Invoices implements IConvertible { int? invoiceId; int? customerId; DateTime? invoiceDate; String? billingAddress; String? billingCity; String? billingState; String? billingCountry; String? billingPostalCode; double? total; Invoices({this.invoiceId,this.customerId,this.invoiceDate,this.billingAddress,this.billingCity,this.billingState,this.billingCountry,this.billingPostalCode,this.total}); Invoices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { invoiceId = json['invoiceId']; customerId = json['customerId']; invoiceDate = JsonConverters.fromJson(json['invoiceDate'],'DateTime',context!); billingAddress = json['billingAddress']; billingCity = json['billingCity']; billingState = json['billingState']; billingCountry = json['billingCountry']; billingPostalCode = json['billingPostalCode']; total = JsonConverters.toDouble(json['total']); return this; } Map toJson() => { 'invoiceId': invoiceId, 'customerId': customerId, 'invoiceDate': JsonConverters.toJson(invoiceDate,'DateTime',context!), 'billingAddress': billingAddress, 'billingCity': billingCity, 'billingState': billingState, 'billingCountry': billingCountry, 'billingPostalCode': billingPostalCode, 'total': total }; getTypeName() => "Invoices"; TypeContext? context = _ctx; } // @Route("/invoices", "GET") // @Route("/invoices/{InvoiceId}", "GET") class QueryInvoices extends QueryDb implements IReturn>, IGet, IConvertible { int? invoiceId; QueryInvoices({this.invoiceId}); QueryInvoices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); invoiceId = json['invoiceId']; return this; } Map toJson() => super.toJson()..addAll({ 'invoiceId': invoiceId }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryInvoices"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'Invoices': TypeInfo(TypeOf.Class, create:() => Invoices()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryInvoices': TypeInfo(TypeOf.Class, create:() => QueryInvoices()), 'List': TypeInfo(TypeOf.Class, create:() => []), });