/* Options: Date: 2024-11-21 12:45:00 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: AddRating.* //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 CreateReview 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 author */ // @ApiMember(Description="The review author") String? ReviewAnswer; CreateReview({this.Title,this.Description,this.Author,this.ReviewAnswer}); CreateReview.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() => "CreateReview"; 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/", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class AddRating implements IReturn, IConvertible, IPost { /** * */ // @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. */ // @ApiMember(Description="The identifier for the booking, use to verify the booking.", IsRequired=true) String? Identifier; /** * The rating score between 1 and 5. */ // @ApiMember(Description="The rating score between 1 and 5.", IsRequired=true) int? RatingScore; /** * The review for the rating */ // @ApiMember(Description="The review for the rating") CreateReview? Review; AddRating({this.CompanyId,this.BookingId,this.Identifier,this.RatingScore,this.Review}); AddRating.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'],'CreateReview',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'BookingId': BookingId, 'Identifier': Identifier, 'RatingScore': RatingScore, 'Review': JsonConverters.toJson(Review,'CreateReview',context!) }; createResponse() => CompanyRatingResponse(); getResponseTypeName() => "CompanyRatingResponse"; getTypeName() => "AddRating"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'RatingReviewResponse': TypeInfo(TypeOf.Class, create:() => RatingReviewResponse()), 'CreateReview': TypeInfo(TypeOf.Class, create:() => CreateReview()), 'CompanyRatingResponse': TypeInfo(TypeOf.Class, create:() => CompanyRatingResponse()), 'AddRating': TypeInfo(TypeOf.Class, create:() => AddRating()), });