syntax = "proto2";
package org.acme.deals;
import "kogito-index.proto";
import "kogito-types.proto";
option kogito_model = "Deals";
option kogito_id = "deals";

/* @Indexed */
message Location {
    option java_package = "org.acme.deals";
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */
    optional string city = 1;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string country = 2;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string street = 3;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string zipCode = 4;
}

/* @Indexed */
message Deals {
    option java_package = "org.acme.deals";
    /* @Field(index = Index.YES, store = Store.YES) @SortableField */ 
    optional string id = 1;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string name = 2;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string review = 3;
    optional Product product = 4;
    /* @Field(index = Index.NO, store = Store.YES) */ 
    optional org.kie.kogito.index.model.KogitoMetadata metadata = 5;
}

/* @Indexed */
message Product {
    option java_package = "org.acme.deals";
    optional Location location = 1;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string name = 2;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string code = 3;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional string label = 4;
    /* @Field(index = Index.NO, store = Store.YES) @SortableField */ 
    optional double price = 5;
}