From d5f9091c74ed7a59587a758454905caf0c643c3c Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Mon, 15 Jan 2024 11:42:35 +0300 Subject: [PATCH] add accommodation info rq/rs and service --- .../accommodation/v1alpha1/info.proto | 39 +++++++++++++++++++ .../v1alpha1/property_types.proto | 3 ++ 2 files changed, 42 insertions(+) create mode 100644 proto/cmp/services/accommodation/v1alpha1/info.proto diff --git a/proto/cmp/services/accommodation/v1alpha1/info.proto b/proto/cmp/services/accommodation/v1alpha1/info.proto new file mode 100644 index 00000000..277217e8 --- /dev/null +++ b/proto/cmp/services/accommodation/v1alpha1/info.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package cmp.services.accommodation.v1alpha1; + +import "cmp/services/accommodation/v1alpha1/property_types.proto"; +import "cmp/types/v1alpha1/common.proto"; +import "cmp/types/v1alpha1/language.proto"; +import "google/protobuf/timestamp.proto"; + +message AccommodationProductInfoRequest { + // Message header + cmp.types.v1alpha1.Header header = 1; + + // Only respond with the products that are modified after this timestamp + google.protobuf.Timestamp modified_after = 2; + + // Languages + repeated cmp.types.v1alpha1.Language languages = 3; + + // Property codes + repeated string propert_codes = 4; +} + +message AccommodationProductInfoResponse { + // Message header + cmp.types.v1alpha1.Header header = 1; + + // Product list: Properties + repeated PropertyExtendedInfo properties = 2; +} + +// Accommodation product info service definition +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/info.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/info.proto.dot.svg) +service AccommodationProductInfoService { + // Returns product list for accommodation (properties) + rpc AccommodationProductInfo(AccommodationProductInfoRequest) returns (AccommodationProductInfoResponse); +} diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index a1ea330b..a70f3031 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -125,6 +125,9 @@ message PropertyExtendedInfo { // Status PropertyStatus status = 8; + + // Rooms + repeated Room rooms = 9; } enum PropertyStatus {