/* Options: Date: 2024-11-21 12:51:25 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: CustomerCommentsQuery.* //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 CustomerComment extends BaseModel implements IConvertible { // @Required() String? CompanyId; int? Id; // @Required() String? CustomerId; // @Required() String? Comments; // @Required() DateTime? Updated; // @Required() DateTime? Created; String? ImageUrl; DateTime? ModifiedDate; CustomerComment({this.CompanyId,this.Id,this.CustomerId,this.Comments,this.Updated,this.Created,this.ImageUrl,this.ModifiedDate}); CustomerComment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Id = json['Id']; CustomerId = json['CustomerId']; Comments = json['Comments']; Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); ImageUrl = json['ImageUrl']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Id': Id, 'CustomerId': CustomerId, 'Comments': Comments, 'Updated': JsonConverters.toJson(Updated,'DateTime',context!), 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'ImageUrl': ImageUrl, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!) }); getTypeName() => "CustomerComment"; TypeContext? context = _ctx; } class CustomerCommentsResponse implements IConvertible { int? Id; String? CustomerId; String? Comments; DateTime? Updated; DateTime? Created; Uri? ImageUrl; CustomerCommentsResponse({this.Id,this.CustomerId,this.Comments,this.Updated,this.Created,this.ImageUrl}); CustomerCommentsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CustomerId = json['CustomerId']; Comments = json['Comments']; Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); return this; } Map toJson() => { 'Id': Id, 'CustomerId': CustomerId, 'Comments': Comments, 'Updated': JsonConverters.toJson(Updated,'DateTime',context!), 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!) }; getTypeName() => "CustomerCommentsResponse"; TypeContext? context = _ctx; } // @Route("/customers/{CustomerId}/comments", "GET") // @ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400) // @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class CustomerCommentsQuery extends QueryDb2 implements IReturn>, ICompany, IConvertible, IGet { // @ApiMember(IsRequired=true) String? CustomerId; // @ApiMember(IsRequired=true) String? CompanyId; CustomerCommentsQuery({this.CustomerId,this.CompanyId}); CustomerCommentsQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CustomerId = json['CustomerId']; CompanyId = json['CompanyId']; return this; } Map toJson() => super.toJson()..addAll({ 'CustomerId': CustomerId, 'CompanyId': CompanyId }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "CustomerCommentsQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'CustomerComment': TypeInfo(TypeOf.Class, create:() => CustomerComment()), 'CustomerCommentsResponse': TypeInfo(TypeOf.Class, create:() => CustomerCommentsResponse()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'CustomerCommentsQuery': TypeInfo(TypeOf.Class, create:() => CustomerCommentsQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });