syntax = "proto3";
package jarviscrawlercore;
option go_package = "github.com/zhs007/jccclient/pb";

// MountainStealsMode - mountain steals mode
enum MountainStealsMode {
    // MSM_SALE - sale
    MSM_SALE = 0;
    // MSM_PRODUCT - product
    MSM_PRODUCT = 1;
}

// MountainStealsSale - mountain steals sale
message MountainStealsSale {
    repeated string products = 1;
    string saleurl = 2;
    string code = 3;
    int64 lastUpdatedTime = 4;
    int64 createTime = 5;
}

// MountainStealsColorSize - mountain steals color size
message MountainStealsColorSize {
    string color = 1;
    string size = 2;
    float price = 3;
    string img = 4;
    string sku = 5;
}

// MountainStealsHistory - MountainSteals history
message MountainStealsHistory {
    int64 updateTime = 1;
    float price = 2;
    float curPrice = 3;
    int32 stockLevel = 4;
    string saleCode = 5;
    repeated MountainStealsColorSize offers = 6;
}

// MountainStealsProduct - mountain steals product
message MountainStealsProduct {
    string code = 1;
    string name = 2;
    repeated string category = 3;
    string brand = 4;
    float rating = 5;
    repeated MountainStealsColorSize colorSize = 6;
    repeated string images = 7;
    float price = 8;
    float minPrice = 9;
    float maxPrice = 10;
    string details = 11;
    string spec = 12;
    repeated int32 ratingCount = 13;
    map<string, float> mapRading = 14;
    string sizeGiud = 15;
    int64 lastUpdatedTime = 16;
    repeated MountainStealsHistory lstHistory = 17;
}

// RequestMountainSteals - request mountain steals
message RequestMountainSteals {
    MountainStealsMode mode = 1;
    string url = 2;
}

// ReplyMountainSteals - reply mountain steals
message ReplyMountainSteals {
    MountainStealsMode mode = 1;

    oneof reply {
        MountainStealsSale sale = 100;
        MountainStealsProduct product = 101;
    }
}