import "mapreduce/yt/interface/protos/extension.proto";

package NWebmaster.NReports.NProto;

message THost {
    optional string Host        = 1 [(NYT.column_name) = "Host"];
}

message TFavoriteQueriesSettings {
    optional string Host            = 1 [(NYT.column_name) = "Host"];
    optional string CorrectedQuery  = 2 [(NYT.column_name) = "CorrectedQuery"];
}

message TFavoriteUrlsSettings {
    optional string Host    = 1 [(NYT.column_name) = "Host"];
    optional string Path    = 2 [(NYT.column_name) = "Path"];
}

message TTopUrlReport {
    optional string Key     = 1 [(NYT.key_column_name) = "key"];
    optional string Subkey  = 2 [(NYT.key_column_name) = "subkey"];
    optional string Value   = 3 [(NYT.column_name) = "value"];
    optional string Path    = 4 [(NYT.column_name) = "path"];
    optional int64  Clicks  = 5 [(NYT.column_name) = "clicks"];
    optional int64  Shows   = 6 [(NYT.column_name) = "shows"];
}

message TArchiveRecord {
    optional int64 Timestamp            = 1 [(NYT.column_name) = "Timestamp"];
    optional int64 Clicks               = 2 [(NYT.column_name) = "Clicks"];
    optional int64 Shows                = 3 [(NYT.column_name) = "Shows"];
    optional int64 ShowsPositionProduct = 4 [(NYT.column_name) = "ShowsPositionProduct"];
}

message TArchiveRecords {
    repeated TArchiveRecord Records = 1;
}

message TArchiveSource {
    optional string Host        = 1 [(NYT.key_column_name) = "Host"];
    optional string Path        = 2 [(NYT.key_column_name) = "Path"];
    optional string Query       = 3 [(NYT.key_column_name) = "Query"];
    optional TArchiveRecords Records = 4 [(NYT.column_name) = "Records"];
}
