syntax = "proto3"; package proto.user.v1; import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; service UserService { rpc CreateUser (CreateUserRequest) returns (CreateUserResponse); } enum Role { ROLE_SPECTATOR_UNSPECIFIED = 0; ROLE_PARTICIPANT = 1; ROLE_MODERATOR = 2; ROLE_ADMIN = 3; } message CreateUserRequest { message User { string username = 1; string password = 2; optional string email = 3; optional google.protobuf.Timestamp expires_at = 4; optional Role role = 5; } string token = 1; User user = 2; } message CreateUserResponse { int32 id = 1; }