Skip to content

Instantly share code, notes, and snippets.

@idy
Last active June 30, 2018 13:04
Show Gist options
  • Save idy/4f757a916f79521e8c79fa29d0533617 to your computer and use it in GitHub Desktop.
Save idy/4f757a916f79521e8c79fa29d0533617 to your computer and use it in GitHub Desktop.
message Page {
message Resource {
oneof id {
string sku = 1;
string product = 2;
string collection = 3;
string product_type = 4;
string brand = 5;
// page id indicates another page in the same storefront
string page = 6;
// TODO(y)
// When we implement discount, add this attribute
// string discount = 7;
// TODO(y)
// When we implement group buying event, add this attribute
// string group_buying_event = 8;
// TODO(y)
// When we implement customer hosted group buying event,
// add this attribute
// customer_hosted_group_buying_event = 9;
// TODO(y)
// When we implement lightning deal event, add this attribute
// customer_hosted_group_buying_event = 10;
}
map<string, string> attributes = 100;
}
// <storefront>/pages/url/format/id
string name = 1;
string title = 2;
string description = 3;
string image_url = 4;
// 该页面包含的资源
repeated Resource resources = 5;
// 只读选项,GetPage 时会返回,为对应的 resource 的数据
repeated google.protobuf.Any details = 6;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment