/* Options: Date: 2024-12-22 22:00:40 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: CreateInvoices.* //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", "POST") class CreateInvoices implements IReturn, IPost, ICreateDb, IConvertible { int? customerId; DateTime? invoiceDate; String? billingAddress; String? billingCity; String? billingState; String? billingCountry; String? billingPostalCode; double? total; CreateInvoices({this.customerId,this.invoiceDate,this.billingAddress,this.billingCity,this.billingState,this.billingCountry,this.billingPostalCode,this.total}); CreateInvoices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { 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() => { 'customerId': customerId, 'invoiceDate': JsonConverters.toJson(invoiceDate,'DateTime',context!), 'billingAddress': billingAddress, 'billingCity': billingCity, 'billingState': billingState, 'billingCountry': billingCountry, 'billingPostalCode': billingPostalCode, 'total': total }; createResponse() => IdResponse(); getResponseTypeName() => "IdResponse"; getTypeName() => "CreateInvoices"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'Invoices': TypeInfo(TypeOf.Class, create:() => Invoices()), 'CreateInvoices': TypeInfo(TypeOf.Class, create:() => CreateInvoices()), });