/* Options: Date: 2024-07-03 12:44:15 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CurrencyQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Currency extends BaseModel implements IConvertible { // @Required() String? Name; // @Required() String? CurrencySign; // @Required() bool? Active; DateTime? ModifiedDate; // @Required() String? Id; Currency({this.Name,this.CurrencySign,this.Active,this.ModifiedDate,this.Id}); Currency.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Name = json['Name']; CurrencySign = json['CurrencySign']; Active = json['Active']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Name': Name, 'CurrencySign': CurrencySign, 'Active': Active, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "Currency"; TypeContext? context = _ctx; } class CurrencyQueryResponse implements IConvertible { String? Id; String? Name; String? Description; String? CurrencySign; bool? Active; ResponseStatus? ResponseStatus; CurrencyQueryResponse({this.Id,this.Name,this.Description,this.CurrencySign,this.Active,this.ResponseStatus}); CurrencyQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; CurrencySign = json['CurrencySign']; Active = json['Active']; ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'CurrencySign': CurrencySign, 'Active': Active, 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "CurrencyQueryResponse"; TypeContext? context = _ctx; } enum Currency { SEK, EUR, } // @Route("/currencies", "GET") class CurrencyQuery extends QueryDb2 implements IReturn>, IConvertible, IGet { /** * Id of the currency */ // @ApiMember(Description="Id of the currency") String? Id; /** * Only active currencies */ // @ApiMember(Description="Only active currencies") bool? Active; CurrencyQuery({this.Id,this.Active}); CurrencyQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Id = json['Id']; Active = json['Active']; return this; } Map toJson() => super.toJson()..addAll({ 'Id': Id, 'Active': Active }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "CurrencyQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'Currency': TypeInfo(TypeOf.Class, create:() => Currency()), 'CurrencyQueryResponse': TypeInfo(TypeOf.Class, create:() => CurrencyQueryResponse()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'CurrencyQuery': TypeInfo(TypeOf.Class, create:() => CurrencyQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });