/* Options: Date: 2024-11-21 11:42:36 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: CategoryQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class BaseModel implements IConvertible { BaseModel(); BaseModel.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "BaseModel"; TypeContext? context = _ctx; } class CompanyCategory extends BaseModel implements IConvertible { // @Required() String? Name; // @Required() String? Header; // @Required() String? Description; Uri? ImageUrl; // @Required() bool? Active; int? SortOrder; DateTime? ModifiedDate; int? Id; CompanyCategory({this.Name,this.Header,this.Description,this.ImageUrl,this.Active,this.SortOrder,this.ModifiedDate,this.Id}); CompanyCategory.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Name = json['Name']; Header = json['Header']; Description = json['Description']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); Active = json['Active']; SortOrder = json['SortOrder']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Name': Name, 'Header': Header, 'Description': Description, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!), 'Active': Active, 'SortOrder': SortOrder, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "CompanyCategory"; TypeContext? context = _ctx; } class CategoryQueryResponse implements IConvertible { int? Id; String? Name; String? Description; String? Header; Uri? ImageUrl; bool? Active; ResponseStatus? ResponseStatus; CategoryQueryResponse({this.Id,this.Name,this.Description,this.Header,this.ImageUrl,this.Active,this.ResponseStatus}); CategoryQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; Header = json['Header']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); Active = json['Active']; ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'Header': Header, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!), 'Active': Active, 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "CategoryQueryResponse"; TypeContext? context = _ctx; } // @Route("/categories", "GET") class CategoryQuery extends QueryDb2 implements IReturn>, IConvertible, IGet { /** * Id of the category */ // @ApiMember(Description="Id of the category") int? Id; CategoryQuery({this.Id}); CategoryQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Id': Id }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "CategoryQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'CompanyCategory': TypeInfo(TypeOf.Class, create:() => CompanyCategory()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'CategoryQueryResponse': TypeInfo(TypeOf.Class, create:() => CategoryQueryResponse()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'CategoryQuery': TypeInfo(TypeOf.Class, create:() => CategoryQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });