syntax = "proto3";
import "google/protobuf/timestamp.proto";

message AcceptedResponse_V1 {
   string Id = 1;
}
message AddItemCheckResponse_V10 {
   CheckItemBaseModel_V10 CheckItem = 1;
   CheckMiniModel_V10 Check = 2;
}
message AddItemCommand_V10 {
   string OutletId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string CheckId = 2;
   AddItem_CheckCreateModel_V10 Check = 3;
   AddItem_CheckItemModel_V10 Item = 4;
   string CourseId = 5;
   string PinOverride = 6;
   string XCorrelationId = 7;
}
message AddItem_CheckCreateModel_V10 {
   OrderFormats OrderFormat = 1;
   SalesLocationTypes SalesLocationType = 2;
   string SalesLocationId = 3; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string CollectionTicketId = 4;
   int32 GuestCount = 5;
}
message AddItem_CheckItemModel_V10 {
   string VariantId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string Quantity = 2;
   string UnitQuantity = 3;
   string KitchenMessage = 4;
   AddItem_CheckItemPriceModel_V10 Price = 5;
   string UpsellGroupId = 6;
   repeated AddItem_ProductItemModificationModel_V10 Modifications = 7;
   string Tag = 8;
   bool IsPrepaid = 9;
   repeated AddItem_SubProductSpecificationModel_V10 SubProductSpecification = 10;
   repeated AddOnProductModel AddOnProducts = 11;
}
message AddItem_CheckItemPriceModel_V10 {
   string UnitPrice = 1;
   string AdditionalPrice = 2;
}
message AddItem_ProductItemModificationModel_V10 {
   string Modification = 1;
   string IngredientId = 2;
   string AddOnGroupId = 3;
   string ReplaceId = 4;
   string Description = 5;
   string Quantity = 6;
   string FreeAmount = 7;
}
message AddItem_SubProductSpecificationModel_V10 {
   string SubProductId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string SubProductVariantId = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
}
message AddOnProductModel {
   string VariantId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string AddOnGroupId = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string Quantity = 3;
   string FreeAmount = 4;
   string UnitQuantity = 5;
}
message BadRequestResponse_V1 {
   string Message = 1;
   string ErrorCode = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
}
message CheckItemAddOnProductModel_V10 {
   string ParentItemId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string AddOnGroupId = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string AddOnGroupName = 3;
   string FreeAmount = 4;
   int32 Position = 5;
}
message CheckItemBaseModel_V10 {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   .google.protobuf.Timestamp Created = 2;
   .google.protobuf.Timestamp Modified = 3;
   OrderedProductModel_V1 Product = 4;
   string Quantity = 5;
   string UnitQuantity = 6;
   UnitModel_V1 Unit = 7;
   PricePerUnitModel_V1 ProductPriceInclTax = 8;
   PricePerUnitModel_V1 ProductPriceExclTax = 9;
   PricePerUnitModel_V1 ProductMaterialCost = 10;
   string KitchenMessage = 11;
   DiscountInfoModel_V1 DiscountInfo = 12;
   DiscountValueModel_V1 DiscountValue = 13;
   string Tag = 14;
   string PricePresetId = 15;
   repeated TaxValueModel_V1 Taxes = 16;
   string PriceInclTax = 17;
   string PriceExclTax = 18;
   string TotalPriceInclTax = 19;
   string TotalPriceExclTax = 20;
   string ProductPricePerQuantityInclTax = 21;
   string TotalMaterialCostExclTax = 22;
   string DiscountableAmountInclTax = 23;
   string DiscountAmountInclTax = 24;
   string DiscountAmountExclTax = 25;
   string TotalDiscountAmountInclTax = 26;
   string TotalDiscountAmountExclTax = 27;
   string ModificationPriceInclTax = 28;
   string ModificationPriceExclTax = 29;
   string DiscountablePriceInclTax = 30;
   string TotalDiscountablePriceInclTax = 31;
   oneof subtype {
      CheckItemModel_V10 CheckItemModel_V10 = 100;
      SubCheckItemModel_V10 SubCheckItemModel_V10 = 101;
      CheckItemAddOnProductModel_V10 CheckItemAddOnProductModel_V10 = 102;
   }
}
message CheckItemModel_V10 {
   string CheckPaymentId = 1;
   .google.protobuf.Timestamp PaidAt = 2;
   string CheckId = 3; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   CheckItemStatuses Status = 4;
   .google.protobuf.Timestamp TicketedAt = 5;
   string TicketedTenantUserId = 6;
   string UpsellGroupId = 7;
   bool IsPrepaid = 8;
   string UsedAccountId = 9;
   string CourseName = 10;
   int32 CoursePosition = 11;
   string OrderItemId = 12;
   repeated ModificationModel_V1 Modifications = 13;
   repeated CheckItemBaseModel_V10 SubCheckItems = 14;
   repeated CheckItemBaseModel_V10 AddOnProducts = 15;
}
enum CheckItemStatuses {
   // this is a composite/flags enumeration
   None = 0;
   Forwarded = 1;
   Ticketed = 2;
   Preview = 4;
   Locked = 8;
   Stopped = 16;
   Incomplete = 32;
}
message CheckMiniModel_V10 {
   string Id = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   int64 TicketNumber = 2;
   string CustomName = 3;
   int64 CustomTicketNumber = 4;
   OrderFormats OrderFormat = 5;
}
enum DateTimeKind {
   Unspecified = 0;
   Utc = 1;
   Local = 2;
}
enum DayOfWeek {
   Sunday = 0;
   Monday = 1;
   Tuesday = 2;
   Wednesday = 3;
   Thursday = 4;
   Friday = 5;
   Saturday = 6;
}
message DiscountInfoModel_V1 {
   string DiscountId = 1;
   string DiscountName = 2;
}
enum DiscountTypes {
   Percentage = 0;
   Currency = 1;
}
message DiscountValueModel_V1 {
   string Value = 1;
   DiscountTypes Type = 2;
}
message ErrorResponse_V1 {
   string ErrorCode = 1;
   string Message = 2;
   string XCorrelationId = 1001;
   int64 Timestamp = 1002;
}
message LockedResponse_V1 {
   string ObjectId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string ObjectType = 2;
   string Timeout = 3;
   string Reason = 4;
}
message ModificationModel_V1 {
   string Modification = 1;
   string IngredientId = 2;
   string AddOnGroupId = 3;
   string ReplaceId = 4;
   string Name = 5;
   string ReplacementName = 6;
   string Quantity = 7;
   string FreeAmount = 8;
   string Cost = 9;
   int32 Position = 10;
}
message ModifyCheckItemQuantityCommandResponse_V10 {
   CheckItemBaseModel_V10 CheckItem = 1;
}
message ModifyCheckItemQuantityCommand_V10 {
   string OutletId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string CheckId = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string CheckItemId = 3; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string Quantity = 4;
   ModifyMode Mode = 5;
   string PinOverride = 6;
   string XCorrelationId = 7;
}
enum ModifyMode {
   None = 0;
   Set = 1;
   Add = 2;
   Subtract = 3;
}
message NotFoundResponse_V1 {
   string Message = 1;
   string ErrorCode = 2; // default value could not be applied: 00000000-0000-0000-0000-000000000000
}
enum OrderFormats {
   // this is a composite/flags enumeration
   None = 0;
   EatIn = 1;
   TakeAway = 2;
   TableOrder = 4;
   Delivery = 8;
   DriveThru = 16;
   System = 32;
   PreGenerated = 64;
   BoxPickup = 128;
   All = 159;
   SystemAll = 191;
}
message OrderedProductModel_V1 {
   string ProductId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string ProductName = 2;
   ProductTypes ProductType = 3;
   string VariantId = 4; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string VariantName = 5;
   VariantTypes VariantType = 6;
   bool HasVariants = 7;
   string ProductGroupId = 8; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   string ProductGroupName = 9;
   string GlassesPerBottle = 10;
   bool UseBasePrice = 11;
   bool IsSystemProduct = 12;
   string ProductNumber = 13;
   string VariantNumber = 14;
   int32 Position = 15;
   string SubProductQuantity = 16;
   string SubProductId = 17;
}
message PricePerUnitModel_V1 {
   string UnitPrice = 1;
   string AdditionalPrice = 2;
}
enum ProductTypes {
   Standard = 0;
   GlassBottle = 1;
   Volume = 2;
   Weight = 3;
   TimeBased = 4;
   GiftCard = 5;
   Wallet = 6;
   MultiProduct = 7;
   Retain24GiftCard = 8;
   MpsGiftCard = 9;
   StammyWallet = 10;
}
message ProtobufRequest {
   string XCorrelationId = 1001;
   oneof subtype {
      AddItemCommand_V10 AddItemCommand_V10 = 1;
      ModifyCheckItemQuantityCommand_V10 ModifyCheckItemQuantityCommand_V10 = 2;
   }
}
message ProtobufResponse {
   string XCorrelationId = 1001;
   int64 Timestamp = 1002;
   oneof subtype {
      ErrorResponse_V1 ErrorResponse_V1 = 1;
      BadRequestResponse_V1 BadRequestResponse_V1 = 2;
      LockedResponse_V1 LockedResponse_V1 = 3;
      NotFoundResponse_V1 NotFoundResponse_V1 = 4;
      UnhandledErrorResponse_V1 UnhandledErrorResponse_V1 = 5;
      AcceptedResponse_V1 AcceptedResponse_V1 = 6;
      AddItemCheckResponse_V10 AddItemCheckResponse_V10 = 7;
      ModifyCheckItemQuantityCommandResponse_V10 ModifyCheckItemQuantityCommandResponse_V10 = 8;
   }
}
enum SalesLocationTypes {
   None = 0;
   Table = 1;
   Pos = 2;
   Express = 3;
}
message SubCheckItemModel_V10 {
   string CheckItemId = 1; // default value could not be applied: 00000000-0000-0000-0000-000000000000
   bool ParentUseBasePrice = 2;
   SubCheckItemStatuses Status = 3;
   string UsedAccountId = 4;
   string UpsellGroupId = 5;
   string CourseName = 6;
   int32 CoursePosition = 7;
   string OrderItemId = 8;
   repeated ModificationModel_V1 Modifications = 9;
   repeated CheckItemBaseModel_V10 AddOnProducts = 10;
}
enum SubCheckItemStatuses {
   // this is a composite/flags enumeration
   None = 0;
   Forwarded = 1;
   Ticketed = 2;
   Incomplete = 4;
   Locked = 8;
}
enum TaxTypes {
   ZERO = 0; // proto3 requires a zero value as the first item (it can be named anything)
   VAT = 1;
   SalesTax = 2;
}
message TaxValueModel_V1 {
   TaxTypes Type = 1;
   string Rate = 2;
}
message UnhandledErrorResponse_V1 {
   string Message = 1;
}
message UnitModel_V1 {
   string Name = 1;
   UnitTypes UnitTypes = 2;
}
enum UnitTypes {
   Pieces = 0;
   Weight = 1;
   Volume = 2;
   Time = 3;
}
enum VariantTypes {
   Standard = 0;
   Glass = 1;
   Bottle = 2;
   Volume = 3;
   Weight = 4;
   TimeBased = 5;
   TopUp = 6;
   MultiProduct = 7;
}
