Skip to content

Commit

Permalink
add amenities to accomodation extended info's room type
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Jan 17, 2024
1 parent 1e426a2 commit c06235d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion proto/cmp/services/accommodation/v1alpha1/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ message AccommodationProductInfoRequest {
repeated cmp.types.v1alpha1.Language languages = 3;

// Property codes
repeated string propert_codes = 4;
repeated string property_codes = 4;
}

message AccommodationProductInfoResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package cmp.services.accommodation.v1alpha1;

import "cmp/types/v1alpha1/address.proto";
import "cmp/types/v1alpha1/amenity.proto";
import "cmp/types/v1alpha1/bed.proto";
import "cmp/types/v1alpha1/description.proto";
import "cmp/types/v1alpha1/email.proto";
Expand Down Expand Up @@ -148,8 +149,6 @@ message Room {
// Meal plan (Board code)
repeated cmp.types.v1alpha1.MealPlan meal_plan = 6;

// FIXME: Need board description & amenities here

// Beds
repeated cmp.types.v1alpha1.Bed beds = 7;

Expand All @@ -158,6 +157,9 @@ message Room {

// Services
repeated cmp.types.v1alpha1.ServiceFact services = 9;

// Amenities
repeated cmp.types.v1alpha1.Amenity amenities = 10;
}

message Occupancy {
Expand Down
26 changes: 26 additions & 0 deletions proto/cmp/types/v1alpha1/amenity.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
syntax = "proto3";

package cmp.types.v1alpha1;

// Amenity message type
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/amenity.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/amenity.proto.dot.svg)
message Amenity {
// Amenity type like INTERNET, POOL, FOOD_BEVERAGE
AmenityType type = 1;

// Attributes of the amenity
map<string, string> attributes = 2;
}

enum AmenityType {
AMENITY_TYPE_UNSPECIFIED = 0;
AMENITY_TYPE_FOOD_AND_DRINK = 1;
AMENITY_TYPE_POOL = 2;
AMENITY_TYPE_BEACH = 3;
AMENITY_TYPE_ATTRACTIONS = 4;
AMENITY_TYPE_THEMES = 5;
AMENITY_TYPE_INTERNET = 6;
AMENITY_TYPE_OTHER = 99;
}

0 comments on commit c06235d

Please sign in to comment.