product.proto 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. syntax = "proto3";
  2. option go_package = "git.mokkon.com/sainw/fho_proto";
  3. option java_multiple_files = true;
  4. package fho;
  5. import "google/protobuf/timestamp.proto";
  6. service ProductService {
  7. rpc GetProducts(ProductRequest) returns (ProductReply) {}
  8. rpc GetPriceSchedules(PriceScheduleRequest) returns (PriceScheduleReply) {}
  9. }
  10. message Product {
  11. string id = 1;
  12. string name = 2;
  13. string color = 3;
  14. }
  15. message ProductRequest { string token = 1; }
  16. message ProductReply {
  17. repeated Product products = 1;
  18. }
  19. message ProductPrice {
  20. string id = 1;
  21. int32 price =2;
  22. }
  23. message PriceSchedule {
  24. enum ScheduleType {
  25. SCHEDULE_TYPE_UNSPECIFIED = 0;
  26. IMMEDIATE = 1;
  27. AFTER_SHIFT_CHANGE = 2;
  28. }
  29. string id = 1;
  30. ScheduleType schedule_type = 2;
  31. google.protobuf.Timestamp schedule_time = 3;
  32. repeated ProductPrice product_prices =4;
  33. }
  34. message PriceScheduleRequest { string token = 1; }
  35. message PriceScheduleReply {
  36. repeated PriceSchedule price_schedules = 1;
  37. }