package NWebmaster.NProto;

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

enum EDiffStatus {
    GONE    = 0;
    NEW     = 1;
}

message TUserSettings {
    optional string Host = 1            [(NYT.key_column_name) = "Host"];
    optional string Path = 2            [(NYT.key_column_name) = "Path"];
    optional string Value = 3           [(NYT.column_name) = "value"];
}

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

message TTurboPageInfo {
    optional string Host = 1            [(NYT.key_column_name) = "Host"];
    optional string Path = 2            [(NYT.key_column_name) = "Path"];
    optional string Feed = 3            [(NYT.key_column_name) = "Feed"];
    optional string Source = 4          [(NYT.key_column_name) = "Source"];
    optional uint64 SourceFlag = 5      [(NYT.key_column_name) = "SourceFlag"];
}

message TPreparedUrl {
    optional string Host = 1            [(NYT.key_column_name) = "Host"];
    optional string Path = 2            [(NYT.key_column_name) = "Path"];
    optional string Proto = 3           [(NYT.column_name) = "Proto"];
}

message TAcceptanceStatisticsWebmasterSimple {
    optional string ChangedField = 1     [(NYT.key_column_name) = "ChangedField"];
    optional int64  Count        = 2     [(NYT.key_column_name) = "Count"];
}

message TSearchBaseDiffRecord {
    optional string Host = 1            [(NYT.key_column_name) = "Host"];
    optional string Path = 2            [(NYT.key_column_name) = "Path"];
    optional string Region = 3          [(NYT.key_column_name) = "Region"];

    optional int64 UrlStatus = 4        [(NYT.column_name)     = "UrlStatus"]; // NJupiter::EAcceptanceUrlForWebMasterSimpleStatus

    optional string BeautyUrl = 5       [(NYT.column_name)     = "BeautyUrl"];

    optional int64 LastAccess = 6       [(NYT.column_name) = "LastAccess"];
    optional uint64 AddTime = 7         [(NYT.column_name) = "AddTime"];
    optional string MainHost = 8        [(NYT.column_name) = "MainHost"];
    optional string MainPath = 9        [(NYT.column_name) = "MainPath"];
    optional string MainRegion = 10     [(NYT.column_name) = "MainRegion"];
    optional string MainMirrorHost = 11 [(NYT.column_name) = "MainMirrorHost"];

    optional string RedirTarget = 12    [(NYT.column_name) = "RedirTarget"];
    optional uint32 HttpCode = 13       [(NYT.column_name) = "HttpCode"];
    //optional uint64 MimeType = 18     [(NYT.column_name) = "MimeType"];
    optional string RelCanonicalTarget = 14 [(NYT.column_name) = "RelCanonicalTarget"];
    optional bool IsIndexed = 15        [(NYT.column_name) = "IsIndexed"];
    optional bool IsFake = 16           [(NYT.column_name) = "IsFake"]; // IsFake && IsIndexed
    optional bool IsSearchable = 17     [(NYT.column_name) = "IsSearchable"]; // Means Host+Path is BeautyUrl for url which IsIndexed. Or it's Fake.
    //optional uint32 SourceId = 19     [(NYT.column_name) = "SourceId"];
    //optional string SourceName = 20   [(NYT.column_name) = "SourceName"];
    //optional uint64 WebTier = 21      [(NYT.column_name) = "WebTier"]; // EWebTier from robot/jupiter/library/index/tiers.h
    //optional string UploadRankValues = 22 [(NYT.column_name) = "UploadRankValues"];
    optional string Title = 30          [(NYT.column_name) = "Title"];
    optional string MetaDescription = 31 [(NYT.column_name) = "MetaDescription"];
    optional string SearchStatus = 32   [(NYT.column_name) = "SearchStatus"];
    optional int64 Timestamp = 33       [(NYT.column_name) = "Timestamp"];
    optional int32 DiffStatus = 34      [(NYT.column_name) = "DiffStatus"];
    optional bool IsTurboPage = 35      [(NYT.column_name) = "IsTurboPage"];
    optional bool IsFromSitemap = 36    [(NYT.column_name) = "IsFromSitemap"];
    optional uint64 TurboSourceFlags = 37 [(NYT.column_name) = "TurboSourceFlags"];
    optional int64 ValidFromMetrikaLastAccess = 38 [(NYT.column_name) = "ValidFromMetrikaLastAccess"];
    optional int64 ValidFromIndexNowLastAccess = 39 [(NYT.column_name) = "ValidFromIndexNowLastAccess"];
    optional string ArchiveKey = 50     [(NYT.key_column_name) = "ArchiveKey"];
    optional string ArchiveContent = 51 [(NYT.key_column_name) = "ArchiveContent"];
}
