guest.proto 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. syntax = "proto3";
  2. package ticket.service.item.v1;
  3. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  4. option (gogoproto.goproto_enum_prefix_all) = false;
  5. option (gogoproto.goproto_getters_all) = false;
  6. option (gogoproto.unmarshaler_all) = true;
  7. option (gogoproto.marshaler_all) = true;
  8. option (gogoproto.sizer_all) = true;
  9. option go_package = "v1";
  10. // The guest service definition.
  11. service Guest {
  12. rpc GuestInfo (GuestInfoRequest) returns (GuestInfoReply) {}
  13. rpc GuestStatus (GuestStatusRequest) returns (GuestInfoReply) {}
  14. }
  15. // The request message containing the guest info to update/insert
  16. message GuestInfoRequest {
  17. uint32 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "validate:\"min=0\"", (gogoproto.customname)= "ID"];
  18. string name = 2 [(gogoproto.jsontag) = "name", (gogoproto.moretags) = "validate:\"max=32\""];
  19. string guest_img = 3 [(gogoproto.jsontag) = "guest_img", (gogoproto.moretags) = "validate:\"min=0\""];
  20. string description = 4 [(gogoproto.jsontag) = "description", (gogoproto.moretags) = "validate:\"max=128\""];
  21. int64 guest_id = 5 [(gogoproto.jsontag) = "guest_id", (gogoproto.customname)= "GuestID"];
  22. }
  23. // The request message containing the required info to change guest's status
  24. message GuestStatusRequest {
  25. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "validate:\"required,min=1\"", (gogoproto.customname)= "ID"];
  26. int32 status = 2 [(gogoproto.jsontag) = "status", (gogoproto.moretags) = "validate:\"max=1\""];
  27. }
  28. // The general response message contaning the result after updating/inserting the guest info
  29. message GuestInfoReply {
  30. bool success = 1 [(gogoproto.jsontag) = "success"];
  31. }