/* Options: Date: 2024-10-16 12:39:57 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: UpdateArticle.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class BaseModel implements IConvertible { BaseModel(); BaseModel.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "BaseModel"; TypeContext? context = _ctx; } class ArticleServiceDb extends BaseModel implements IConvertible { // @Required() String? CompanyId; int? Id; // @Required() int? ServiceId; // @Required() int? ArticleId; ArticleServiceDb({this.CompanyId,this.Id,this.ServiceId,this.ArticleId}); ArticleServiceDb.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Id = json['Id']; ServiceId = json['ServiceId']; ArticleId = json['ArticleId']; return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Id': Id, 'ServiceId': ServiceId, 'ArticleId': ArticleId }); getTypeName() => "ArticleServiceDb"; TypeContext? context = _ctx; } class ArticleResponse implements IConvertible { String? CompanyId; int? Id; String? Name; int? ArticleTypeId; String? Description; String? ImageUrl; bool? Active; int? Amount; double? Price; String? CurrencyId; DateTime? UpdatedDate; DateTime? CreatedDate; List? Services; List? ServiceIds; String? PriceSign; ArticleResponse({this.CompanyId,this.Id,this.Name,this.ArticleTypeId,this.Description,this.ImageUrl,this.Active,this.Amount,this.Price,this.CurrencyId,this.UpdatedDate,this.CreatedDate,this.Services,this.ServiceIds,this.PriceSign}); ArticleResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; Name = json['Name']; ArticleTypeId = json['ArticleTypeId']; Description = json['Description']; ImageUrl = json['ImageUrl']; Active = json['Active']; Amount = json['Amount']; Price = JsonConverters.toDouble(json['Price']); CurrencyId = json['CurrencyId']; UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); ServiceIds = JsonConverters.fromJson(json['ServiceIds'],'List',context!); PriceSign = json['PriceSign']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id, 'Name': Name, 'ArticleTypeId': ArticleTypeId, 'Description': Description, 'ImageUrl': ImageUrl, 'Active': Active, 'Amount': Amount, 'Price': Price, 'CurrencyId': CurrencyId, 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!), 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'Services': JsonConverters.toJson(Services,'List',context!), 'ServiceIds': JsonConverters.toJson(ServiceIds,'List',context!), 'PriceSign': PriceSign }; getTypeName() => "ArticleResponse"; TypeContext? context = _ctx; } // @Route("/articles/{Id}", "PUT") class UpdateArticle implements IReturn, ICompany, IConvertible, IPut { /** * */ // @ApiMember(Description="", IsRequired=true, ParameterType="query") int? Id; /** * */ // @ApiMember(Description="") String? CompanyId; /** * */ // @ApiMember(Description="") String? Name; /** * */ // @ApiMember(Description="") int? ArticleTypeId; /** * */ // @ApiMember(Description="") String? Description; /** * */ // @ApiMember(Description="") Uri? ImageUrl; /** * */ // @ApiMember(Description="") bool? Active; /** * */ // @ApiMember(Description="") int? Amount; /** * . */ // @ApiMember(Description=".") double? Price; /** * The payment currency id */ // @ApiMember(Description="The payment currency id") String? CurrencyId; /** * Query for specific services. */ // @ApiMember(Description="Query for specific services.", ParameterType="query") List? ServiceIds; UpdateArticle({this.Id,this.CompanyId,this.Name,this.ArticleTypeId,this.Description,this.ImageUrl,this.Active,this.Amount,this.Price,this.CurrencyId,this.ServiceIds}); UpdateArticle.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; Name = json['Name']; ArticleTypeId = json['ArticleTypeId']; Description = json['Description']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); Active = json['Active']; Amount = json['Amount']; Price = JsonConverters.toDouble(json['Price']); CurrencyId = json['CurrencyId']; ServiceIds = JsonConverters.fromJson(json['ServiceIds'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'Name': Name, 'ArticleTypeId': ArticleTypeId, 'Description': Description, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!), 'Active': Active, 'Amount': Amount, 'Price': Price, 'CurrencyId': CurrencyId, 'ServiceIds': JsonConverters.toJson(ServiceIds,'List',context!) }; createResponse() => ArticleResponse(); getResponseTypeName() => "ArticleResponse"; getTypeName() => "UpdateArticle"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'ArticleServiceDb': TypeInfo(TypeOf.Class, create:() => ArticleServiceDb()), 'ArticleResponse': TypeInfo(TypeOf.Class, create:() => ArticleResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'UpdateArticle': TypeInfo(TypeOf.Class, create:() => UpdateArticle()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), });