/* Options: Date: 2024-12-22 21:19:12 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: CreateTodo.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class Todo implements IConvertible { int? id; String? text; bool? isFinished; Todo({this.id,this.text,this.isFinished}); Todo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; text = json['text']; isFinished = json['isFinished']; return this; } Map toJson() => { 'id': id, 'text': text, 'isFinished': isFinished }; getTypeName() => "Todo"; TypeContext? context = _ctx; } // @Route("/todos", "POST") class CreateTodo implements IReturn, IPost, IConvertible { // @Validate(Validator="NotEmpty") String? text; CreateTodo({this.text}); CreateTodo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { text = json['text']; return this; } Map toJson() => { 'text': text }; createResponse() => Todo(); getResponseTypeName() => "Todo"; getTypeName() => "CreateTodo"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'Todo': TypeInfo(TypeOf.Class, create:() => Todo()), 'CreateTodo': TypeInfo(TypeOf.Class, create:() => CreateTodo()), });