Skip to content

Commit

Permalink
T #98 fixed proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
HueByte committed Oct 6, 2022
1 parent a97490b commit d74266e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Protobuf Include="Protos\commandLog.proto" GrpcServices="Server" />
<Protobuf Include="Protos\gpt.proto" GrpcServices="Server" />
<Protobuf Include="Protos\greet.proto" GrpcServices="Server" />
<Protobuf Include="Protos\models\database.proto" GrpcServices="Server" />
<Protobuf Include="Protos\database.proto" GrpcServices="Server" />
<Protobuf Include="Protos\server.proto" GrpcServices="Server" />
</ItemGroup>

Expand Down
8 changes: 2 additions & 6 deletions src/HuppyService/HuppyService.Service/Protos/commandLog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax = "proto3";
option csharp_namespace = "HuppyService.Service.Protos";

import "google/protobuf/empty.proto";
import "Protos/models/database.proto";
import "Protos/database.proto";

package CommandLogProto;

Expand All @@ -12,7 +12,7 @@ service CommandLogProto {
rpc GetAverageExecutionTime(google.protobuf.Empty) returns (AverageTimeResponse);
rpc GetAiUsage(google.protobuf.Empty) returns (AiUsageResponse);
rpc AddCommand(database.models.CommandLogModel) returns (database.models.CommandLogModel);
rpc RemoveCommand(database.models.CommandLogModel) returns (CommandLogResponse);
rpc RemoveCommand(database.models.CommandLogModel) returns (database.models.CommonResponse);
}

message CommandLogCount {
Expand All @@ -25,8 +25,4 @@ message AverageTimeResponse {

message AiUsageResponse {
map<uint64, int32> AiUsers = 1;
}

message CommandLogResponse {
bool IsSuccess = 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ message ServerModel {
bool UseGreet = 3;
string GreetMessage = 4;
uint64 RoleId = 5;
uint64 ServerRommsId = 6;
uint64 ServerRoomsId = 6;
ServerRoomsModel Rooms = 7;
}

Expand All @@ -31,4 +31,8 @@ message ServerRoomsModel {
uint64 OutputRoom = 2;
uint64 GreetingRoom = 3;
uint64 ServerId = 4;
}

message CommonResponse {
bool IsSuccess = 1;
}
13 changes: 7 additions & 6 deletions src/HuppyService/HuppyService.Service/Protos/server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ syntax = "proto3";
option csharp_namespace = "HuppyService.Service.Protos";

import "google/protobuf/empty.proto";
import "Protos/models/database.proto";
import "Protos/database.proto";

package ServerProto;

service ServerProto {
rpc Get(ServerIdInput) returns (database.models.ServerModel);
rpc GetOrCreate(GetOrCreateServerInput) returns (database.models.ServerModel);
rpc UpdateAsync(database.models.ServerModel) returns(ServerProtoDefaultResponse);
rpc Update(database.models.ServerModel) returns(database.models.CommonResponse);
rpc GetAll(google.protobuf.Empty) returns (ServerModelCollection);
}

message ServerIdInput {
uint64 Id = 1;
}

message ServerModelCollection {
repeated database.models.ServerModel ServerModel= 1;
}
Expand All @@ -21,8 +26,4 @@ message GetOrCreateServerInput {
uint64 Id = 1;
string ServerName = 2;
uint64 DefaultChannel = 3;
}

message ServerProtoDefaultResponse {
bool IsSuccess = 1;
}

0 comments on commit d74266e

Please sign in to comment.