/* Options: Date: 2025-12-16 01:42:09 Version: 10.04 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-vue.web-templates.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: DeleteCoupon.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; /** * Discount Coupons */ class Coupon implements IConvertible { String id = ""; String description = ""; int discount = 0; DateTime expiryDate = DateTime(0); 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_vue.web_templates.io', types: { 'Coupon': TypeInfo(TypeOf.Class, create:() => Coupon()), 'DeleteCoupon': TypeInfo(TypeOf.Class, create:() => DeleteCoupon()), });