/* Options: Date: 2024-11-24 14:20:23 Version: 6.111 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://sharpscript.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: QueryCustomers.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Order implements IConvertible { int? orderId; String? customerId; DateTime? orderDate; double? total; Order({this.orderId,this.customerId,this.orderDate,this.total}); Order.fromJson(Map json) { fromMap(json); } fromMap(Map json) { orderId = json['orderId']; customerId = json['customerId']; orderDate = JsonConverters.fromJson(json['orderDate'],'DateTime',context!); total = JsonConverters.toDouble(json['total']); return this; } Map toJson() => { 'orderId': orderId, 'customerId': customerId, 'orderDate': JsonConverters.toJson(orderDate,'DateTime',context!), 'total': total }; getTypeName() => "Order"; TypeContext? context = _ctx; } class Customer implements IConvertible { String? customerId; String? companyName; String? address; String? city; String? region; String? postalCode; String? country; String? phone; String? fax; List? orders; Customer({this.customerId,this.companyName,this.address,this.city,this.region,this.postalCode,this.country,this.phone,this.fax,this.orders}); Customer.fromJson(Map json) { fromMap(json); } fromMap(Map json) { customerId = json['customerId']; companyName = json['companyName']; address = json['address']; city = json['city']; region = json['region']; postalCode = json['postalCode']; country = json['country']; phone = json['phone']; fax = json['fax']; orders = JsonConverters.fromJson(json['orders'],'List',context!); return this; } Map toJson() => { 'customerId': customerId, 'companyName': companyName, 'address': address, 'city': city, 'region': region, 'postalCode': postalCode, 'country': country, 'phone': phone, 'fax': fax, 'orders': JsonConverters.toJson(orders,'List',context!) }; getTypeName() => "Customer"; TypeContext? context = _ctx; } class QueryCustomers extends QueryDb implements IReturn>, IConvertible, IGet { String? customerId; String? companyNameContains; List? countryIn; QueryCustomers({this.customerId,this.companyNameContains,this.countryIn}); QueryCustomers.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); customerId = json['customerId']; companyNameContains = json['companyNameContains']; countryIn = JsonConverters.fromJson(json['countryIn'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'customerId': customerId, 'companyNameContains': companyNameContains, 'countryIn': JsonConverters.toJson(countryIn,'List',context!) }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryCustomers"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'sharpscript.net', types: { 'Order': TypeInfo(TypeOf.Class, create:() => Order()), 'Customer': TypeInfo(TypeOf.Class, create:() => Customer()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryCustomers': TypeInfo(TypeOf.Class, create:() => QueryCustomers()), 'List': TypeInfo(TypeOf.Class, create:() => []), });