syntax = "proto3";

package com.wix.ecommerce.catalog_spi.api.v1;

import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";
import "com/wix/ecommerce/platform_common/api/price.proto";
import "com/wix/ecommerce/platform_common/api/translatable_string.proto";

message ModifierGroup {
  // Modifier group ID.
  string id = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 36];

  // Modifier group name.
  com.wix.ecommerce.platform_common.api.TranslatableString name = 2;

  // List of modifiers in this group.
  repeated ItemModifier modifiers = 3 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 25];
}

message ItemModifier {
  // Modifier ID.
  string id = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 36];

  // The quantity of this modifier.
  google.protobuf.Int32Value quantity = 2 [(.wix.api.min) = 1, (.wix.api.max) = 100000];

  // Primary display label for the modifier.
  com.wix.ecommerce.platform_common.api.TranslatableString label = 3;

  // Additional details.
  com.wix.ecommerce.platform_common.api.TranslatableString details = 4;

  // The price of the modifier.
  google.protobuf.StringValue price = 5 [(.wix.api.decimalValue) = { gte: "0" lte: "1000000000000000" maxScale: 3}];
}