/* Options: Date: 2026-09-02 15:39:46 Version: 10.09 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://test.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateRockstarVersion.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum LivingStatus { Alive, Dead, } abstract class RockstarBase { String firstName = ""; String lastName = ""; int? age; DateTime? dateOfBirth; DateTime? dateDied; LivingStatus? livingStatus; RockstarBase({this.firstName="",this.lastName="",this.age,this.dateOfBirth,this.dateDied,this.livingStatus}); RockstarBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { firstName = json['firstName'] ?? ""; lastName = json['lastName'] ?? ""; age = json['age']; dateOfBirth = JsonConverters.fromJson(json['dateOfBirth'],'DateTime',context!) ?? DateTime(0); dateDied = JsonConverters.fromJson(json['dateDied'],'DateTime',context!); livingStatus = JsonConverters.fromJson(json['livingStatus'],'LivingStatus',context!); return this; } Map toJson() => { 'firstName': firstName, 'lastName': lastName, 'age': age, 'dateOfBirth': JsonConverters.toJson(dateOfBirth,'DateTime',context!), 'dateDied': JsonConverters.toJson(dateDied,'DateTime',context!), 'livingStatus': JsonConverters.toJson(livingStatus,'LivingStatus',context!) }; getTypeName() => "RockstarBase"; TypeContext? context = _ctx; } class RockstarVersion extends RockstarBase implements IConvertible { int id = 0; int rowVersion = 0; RockstarVersion({this.id=0,this.rowVersion=0}); RockstarVersion.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id'] ?? 0; rowVersion = json['rowVersion'] ?? 0; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'rowVersion': rowVersion }); getTypeName() => "RockstarVersion"; TypeContext? context = _ctx; } class RockstarWithIdAndRowVersionResponse implements IConvertible { int id = 0; int rowVersion = 0; ResponseStatus? responseStatus; RockstarWithIdAndRowVersionResponse({this.id=0,this.rowVersion=0,this.responseStatus}); RockstarWithIdAndRowVersionResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id'] ?? 0; rowVersion = json['rowVersion'] ?? 0; responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'id': id, 'rowVersion': rowVersion, 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "RockstarWithIdAndRowVersionResponse"; TypeContext? context = _ctx; } class CreateRockstarVersion extends RockstarBase implements IReturn, ICreateDb, IConvertible, IPost { CreateRockstarVersion(); CreateRockstarVersion.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => RockstarWithIdAndRowVersionResponse(); getResponseTypeName() => "RockstarWithIdAndRowVersionResponse"; getTypeName() => "CreateRockstarVersion"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: { 'LivingStatus': TypeInfo(TypeOf.Enum, enumValues:LivingStatus.values), 'RockstarBase': TypeInfo(TypeOf.AbstractClass), 'RockstarVersion': TypeInfo(TypeOf.Class, create:() => RockstarVersion()), 'RockstarWithIdAndRowVersionResponse': TypeInfo(TypeOf.Class, create:() => RockstarWithIdAndRowVersionResponse()), 'CreateRockstarVersion': TypeInfo(TypeOf.Class, create:() => CreateRockstarVersion()), });