/* Options: Date: 2025-01-08 03:10:32 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazordiffusion.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateTodo.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; 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: 'blazordiffusion.com', types: { 'Todo': TypeInfo(TypeOf.Class, create:() => Todo()), 'CreateTodo': TypeInfo(TypeOf.Class, create:() => CreateTodo()), });