/* Options: Date: 2026-09-01 21:52:35 Version: 10.09 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 */ import 'package:servicestack/servicestack.dart'; class Invoices implements IConvertible { int invoiceId = 0; int customerId = 0; DateTime? invoiceDate; String billingAddress = ""; String billingCity = ""; String billingState = ""; String billingCountry = ""; String billingPostalCode = ""; double total = 0; Invoices({this.invoiceId=0,this.customerId=0,this.invoiceDate,this.billingAddress="",this.billingCity="",this.billingState="",this.billingCountry="",this.billingPostalCode="",this.total=0}); Invoices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { invoiceId = json['invoiceId'] ?? 0; customerId = json['customerId'] ?? 0; invoiceDate = JsonConverters.fromJson(json['invoiceDate'],'DateTime',context!) ?? DateTime(0); billingAddress = json['billingAddress'] ?? ""; billingCity = json['billingCity'] ?? ""; billingState = json['billingState'] ?? ""; billingCountry = json['billingCountry'] ?? ""; billingPostalCode = json['billingPostalCode'] ?? ""; total = JsonConverters.toDouble(json['total']) ?? 0; 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 = 0; DateTime? invoiceDate; String billingAddress = ""; String billingCity = ""; String billingState = ""; String billingCountry = ""; String billingPostalCode = ""; double total = 0; CreateInvoices({this.customerId=0,this.invoiceDate,this.billingAddress="",this.billingCity="",this.billingState="",this.billingCountry="",this.billingPostalCode="",this.total=0}); CreateInvoices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { customerId = json['customerId'] ?? 0; invoiceDate = JsonConverters.fromJson(json['invoiceDate'],'DateTime',context!) ?? DateTime(0); billingAddress = json['billingAddress'] ?? ""; billingCity = json['billingCity'] ?? ""; billingState = json['billingState'] ?? ""; billingCountry = json['billingCountry'] ?? ""; billingPostalCode = json['billingPostalCode'] ?? ""; total = JsonConverters.toDouble(json['total']) ?? 0; 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()), });