ApiServer
This commit is contained in:
@@ -6,8 +6,22 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Google.Protobuf" Version="3.27.0" />
|
||||
<PackageReference Include="Grpc.AspNetCore" Version="2.67.0" />
|
||||
<PackageReference Include="Grpc.Net.Client" Version="2.67.0" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.67.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Domain\Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="Protos\sms.proto" GrpcServices="Both" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
43
src/Contracts/Protos/sms.proto
Normal file
43
src/Contracts/Protos/sms.proto
Normal file
@@ -0,0 +1,43 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
package sms.test;
|
||||
|
||||
option csharp_namespace = "Sms.Test";
|
||||
|
||||
message MenuItem {
|
||||
string id = 1;
|
||||
string article = 2;
|
||||
string name = 3;
|
||||
double price = 4;
|
||||
bool is_weighted = 5;
|
||||
string full_path = 6;
|
||||
repeated string barcodes = 7;
|
||||
}
|
||||
|
||||
message OrderItem {
|
||||
string id = 1;
|
||||
double quantity = 2;
|
||||
}
|
||||
|
||||
message Order {
|
||||
string id = 1;
|
||||
repeated OrderItem order_items = 2;
|
||||
}
|
||||
|
||||
message GetMenuResponse {
|
||||
bool success = 1;
|
||||
string error_message = 2;
|
||||
repeated MenuItem menu_items = 3;
|
||||
}
|
||||
|
||||
message SendOrderResponse {
|
||||
bool success = 1;
|
||||
string error_message = 2;
|
||||
}
|
||||
|
||||
service SmsTestService {
|
||||
rpc GetMenu(google.protobuf.BoolValue) returns (GetMenuResponse);
|
||||
rpc SendOrder(Order) returns (SendOrderResponse);
|
||||
}
|
||||
Reference in New Issue
Block a user