Skip to content

Instantly share code, notes, and snippets.

@ArminShoeibi
Last active February 9, 2021 19:00
Show Gist options
  • Select an option

  • Save ArminShoeibi/626ba9a61a1918d161906c91f4cec3d9 to your computer and use it in GitHub Desktop.

Select an option

Save ArminShoeibi/626ba9a61a1918d161906c91f4cec3d9 to your computer and use it in GitHub Desktop.
syntax = "proto3"; /* version of the protocol buffers language */
option csharp_namespace = "DNZ.TicketingSystem.GrpcServer.Protos";
message CreateTicketDto {
int32 user_id = 1;
int32 category_id = 2;
string title = 3;
string description = 4;
}
message TicketCreationResultDto {
enum TicketStatus {
NEW = 0; /*Protobuf enumeration definitions must have a zero constant as their first field*/
OPEN = 1;
INPROGRESS = 2;
CLOSED = 3;
}
string result_message = 1;
int32 tracking_number = 2;
TicketStatus ticket_status = 3;
}
service TicketService {
rpc CreateTicket(CreateTicketDto) returns (TicketCreationResultDto);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment