/* Options: Date: 2024-12-22 21:19:01 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: DeleteCoupon.* //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; } /** * Delete a Coupon */ // @Route("/coupons/{Id}", "DELETE") // @ValidateRequest(Validator="HasRole(`Manager`)") class DeleteCoupon implements IReturnVoid, IDeleteDb, IConvertible, IDelete { String? id; DeleteCoupon({this.id}); DeleteCoupon.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; return this; } Map toJson() => { 'id': id }; createResponse() {} getTypeName() => "DeleteCoupon"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'Coupon': TypeInfo(TypeOf.Class, create:() => Coupon()), 'DeleteCoupon': TypeInfo(TypeOf.Class, create:() => DeleteCoupon()), });