syntax = "proto3";

package wix.devcenter.plans.v1;
option java_package = "com.wixpress.devcenter.plans.v1";

import "wix/api/validations.proto";
import "wix/api/entity.proto";
import "wix/api/annotations.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";

message Feature {
  // Id of the Feature
  string id = 1  [(wix.api.format) = GUID, (wix.api.readOnly) = true];
  // The app id that the feature belongs to
  string app_id = 2 [(.wix.api.format) = GUID];
  // Name of the feature presented to the user in the Package Picker
  google.protobuf.StringValue name = 3;
  // Description of the feature shown to the user in the Package Picker
  google.protobuf.StringValue description = 4;
  // The translated feature content, includes feature name and description in the user's language
  FeatureContent feature_content = 5;
  // Revision number, which increments by 1 each time the Plan is updated.
  google.protobuf.Int64Value revision = 6 [(wix.api.readOnly) = true];
  // Date and time the Plan was created.
  google.protobuf.Timestamp created_date = 7 [(wix.api.readOnly) = true];
  // Date and time the Plan was last updated.
  google.protobuf.Timestamp updated_date = 8 [(wix.api.readOnly) = true];
  // Indicates if the feature is archived
  google.protobuf.BoolValue archived = 9;
}

message FeatureContent {
  // The user's language code, declared by the user in the site settings
  string language_code = 1 [(.wix.api.format) = LANGUAGE];
  // The translated feature name
  google.protobuf.StringValue name = 2;
  // The translated feature description
  google.protobuf.StringValue description = 3;
}
