/* Options: Date: 2024-12-22 21:08:54 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: CreateTracks.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class Tracks implements IConvertible { int? trackId; // @required() String? name; int? albumId; int? mediaTypeId; int? genreId; String? composer; int? milliseconds; int? bytes; double? unitPrice; Tracks({this.trackId,this.name,this.albumId,this.mediaTypeId,this.genreId,this.composer,this.milliseconds,this.bytes,this.unitPrice}); Tracks.fromJson(Map json) { fromMap(json); } fromMap(Map json) { trackId = json['trackId']; name = json['name']; albumId = json['albumId']; mediaTypeId = json['mediaTypeId']; genreId = json['genreId']; composer = json['composer']; milliseconds = json['milliseconds']; bytes = json['bytes']; unitPrice = JsonConverters.toDouble(json['unitPrice']); return this; } Map toJson() => { 'trackId': trackId, 'name': name, 'albumId': albumId, 'mediaTypeId': mediaTypeId, 'genreId': genreId, 'composer': composer, 'milliseconds': milliseconds, 'bytes': bytes, 'unitPrice': unitPrice }; getTypeName() => "Tracks"; TypeContext? context = _ctx; } // @Route("/tracks", "POST") class CreateTracks implements IReturn, IPost, ICreateDb, IConvertible { String? name; int? albumId; int? mediaTypeId; int? genreId; String? composer; int? milliseconds; int? bytes; double? unitPrice; CreateTracks({this.name,this.albumId,this.mediaTypeId,this.genreId,this.composer,this.milliseconds,this.bytes,this.unitPrice}); CreateTracks.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; albumId = json['albumId']; mediaTypeId = json['mediaTypeId']; genreId = json['genreId']; composer = json['composer']; milliseconds = json['milliseconds']; bytes = json['bytes']; unitPrice = JsonConverters.toDouble(json['unitPrice']); return this; } Map toJson() => { 'name': name, 'albumId': albumId, 'mediaTypeId': mediaTypeId, 'genreId': genreId, 'composer': composer, 'milliseconds': milliseconds, 'bytes': bytes, 'unitPrice': unitPrice }; createResponse() => IdResponse(); getResponseTypeName() => "IdResponse"; getTypeName() => "CreateTracks"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'Tracks': TypeInfo(TypeOf.Class, create:() => Tracks()), 'CreateTracks': TypeInfo(TypeOf.Class, create:() => CreateTracks()), });