/* Options: Date: 2025-05-13 22:27:06 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://chinook.netcore.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateAlbums.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Albums implements IConvertible { int? albumId; // @required() String? title; int? artistId; Albums({this.albumId,this.title,this.artistId}); Albums.fromJson(Map json) { fromMap(json); } fromMap(Map json) { albumId = json['albumId']; title = json['title']; artistId = json['artistId']; return this; } Map toJson() => { 'albumId': albumId, 'title': title, 'artistId': artistId }; getTypeName() => "Albums"; TypeContext? context = _ctx; } // @Route("/albums", "POST") class CreateAlbums implements IReturn, IPost, ICreateDb, IConvertible { // @Validate(Validator="NotEmpty") String? title; // @Validate(Validator="GreaterThan(0)") int? artistId; CreateAlbums({this.title,this.artistId}); CreateAlbums.fromJson(Map json) { fromMap(json); } fromMap(Map json) { title = json['title']; artistId = json['artistId']; return this; } Map toJson() => { 'title': title, 'artistId': artistId }; createResponse() => IdResponse(); getResponseTypeName() => "IdResponse"; getTypeName() => "CreateAlbums"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'chinook.netcore.io', types: { 'Albums': TypeInfo(TypeOf.Class, create:() => Albums()), 'CreateAlbums': TypeInfo(TypeOf.Class, create:() => CreateAlbums()), });