/* Options: Date: 2024-07-03 12:44:48 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: UpdateRating.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class RatingReviewResponse implements IConvertible { /** * The title for the review */ // @ApiMember(Description="The title for the review") String? Title; /** * The description for the review */ // @ApiMember(Description="The description for the review") String? Description; /** * The rating score */ // @ApiMember(Description="The rating score") int? RatingScore; /** * The review author */ // @ApiMember(Description="The review author") String? Author; /** * The created date */ // @ApiMember(Description="The created date") DateTime? Created; /** * The review answer from the company */ // @ApiMember(Description="The review answer from the company") String? ReviewAnswer; RatingReviewResponse({this.Title,this.Description,this.RatingScore,this.Author,this.Created,this.ReviewAnswer}); RatingReviewResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Title = json['Title']; Description = json['Description']; RatingScore = json['RatingScore']; Author = json['Author']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); ReviewAnswer = json['ReviewAnswer']; return this; } Map toJson() => { 'Title': Title, 'Description': Description, 'RatingScore': RatingScore, 'Author': Author, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'ReviewAnswer': ReviewAnswer }; getTypeName() => "RatingReviewResponse"; TypeContext? context = _ctx; } class UpdateReview implements IConvertible { /** * The title for the review */ // @ApiMember(Description="The title for the review") String? Title; /** * The description for the review */ // @ApiMember(Description="The description for the review") String? Description; /** * The review author */ // @ApiMember(Description="The review author") String? Author; /** * The review answer from the company. Only the company can respond to this */ // @ApiMember(Description="The review answer from the company. Only the company can respond to this") String? ReviewAnswer; UpdateReview({this.Title,this.Description,this.Author,this.ReviewAnswer}); UpdateReview.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Title = json['Title']; Description = json['Description']; Author = json['Author']; ReviewAnswer = json['ReviewAnswer']; return this; } Map toJson() => { 'Title': Title, 'Description': Description, 'Author': Author, 'ReviewAnswer': ReviewAnswer }; getTypeName() => "UpdateReview"; TypeContext? context = _ctx; } class CompanyRatingResponse implements IConvertible { /** * */ // @ApiMember(Description="") String? CompanyId; /** * Id of the booking */ // @ApiMember(Description="Id of the booking") int? BookingId; /** * The status of the rating, 1 = Active */ // @ApiMember(Description="The status of the rating, 1 = Active") int? Status; /** * The rating score */ // @ApiMember(Description="The rating score") int? RatingScore; /** * The review if any exists to the rating */ // @ApiMember(Description="The review if any exists to the rating") RatingReviewResponse? Review; DateTime? CreatedDate; DateTime? UpdatedDate; CompanyRatingResponse({this.CompanyId,this.BookingId,this.Status,this.RatingScore,this.Review,this.CreatedDate,this.UpdatedDate}); CompanyRatingResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; BookingId = json['BookingId']; Status = json['Status']; RatingScore = json['RatingScore']; Review = JsonConverters.fromJson(json['Review'],'RatingReviewResponse',context!); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'BookingId': BookingId, 'Status': Status, 'RatingScore': RatingScore, 'Review': JsonConverters.toJson(Review,'RatingReviewResponse',context!), 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!) }; getTypeName() => "CompanyRatingResponse"; TypeContext? context = _ctx; } // @Route("/rating/", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class UpdateRating implements IReturn, IConvertible, IPut { /** * */ // @ApiMember(Description="", IsRequired=true) String? CompanyId; /** * Id of the booking */ // @ApiMember(Description="Id of the booking", IsRequired=true) int? BookingId; /** * The identifier for the booking, use to verify the booking. Only needed when a customer, not admin */ // @ApiMember(Description="The identifier for the booking, use to verify the booking. Only needed when a customer, not admin") String? Identifier; /** * The rating score between 1 and 5. */ // @ApiMember(Description="The rating score between 1 and 5.") int? RatingScore; /** * The review for the rating */ // @ApiMember(Description="The review for the rating") UpdateReview? Review; UpdateRating({this.CompanyId,this.BookingId,this.Identifier,this.RatingScore,this.Review}); UpdateRating.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; BookingId = json['BookingId']; Identifier = json['Identifier']; RatingScore = json['RatingScore']; Review = JsonConverters.fromJson(json['Review'],'UpdateReview',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'BookingId': BookingId, 'Identifier': Identifier, 'RatingScore': RatingScore, 'Review': JsonConverters.toJson(Review,'UpdateReview',context!) }; createResponse() => CompanyRatingResponse(); getResponseTypeName() => "CompanyRatingResponse"; getTypeName() => "UpdateRating"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'RatingReviewResponse': TypeInfo(TypeOf.Class, create:() => RatingReviewResponse()), 'UpdateReview': TypeInfo(TypeOf.Class, create:() => UpdateReview()), 'CompanyRatingResponse': TypeInfo(TypeOf.Class, create:() => CompanyRatingResponse()), 'UpdateRating': TypeInfo(TypeOf.Class, create:() => UpdateRating()), });