/* Options: Date: 2024-12-22 21:07:17 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: QueryCoupons.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; /** * Discount Coupons */ class Coupon implements IConvertible { String? id; String? description; int? discount; DateTime? expiryDate; Coupon({this.id,this.description,this.discount,this.expiryDate}); Coupon.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; description = json['description']; discount = json['discount']; expiryDate = JsonConverters.fromJson(json['expiryDate'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'description': description, 'discount': discount, 'expiryDate': JsonConverters.toJson(expiryDate,'DateTime',context!) }; getTypeName() => "Coupon"; TypeContext? context = _ctx; } /** * Find Coupons */ // @Route("/coupons", "GET") class QueryCoupons extends QueryDb implements IReturn>, IConvertible, IGet { String? id; QueryCoupons({this.id}); QueryCoupons.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryCoupons"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'Coupon': TypeInfo(TypeOf.Class, create:() => Coupon()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryCoupons': TypeInfo(TypeOf.Class, create:() => QueryCoupons()), 'List': TypeInfo(TypeOf.Class, create:() => []), });