2025-09-27 10:36:00 +03:30
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package userorder;
|
|
|
|
|
|
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
|
import "google/protobuf/wrappers.proto";
|
|
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
|
|
option csharp_namespace = "FrontOffice.BFF.UserOrder.Protobuf.Protos.UserOrder";
|
|
|
|
|
|
|
|
|
|
service UserOrderContract
|
|
|
|
|
{
|
|
|
|
|
rpc CreateNewUserOrder(CreateNewUserOrderRequest) returns (CreateNewUserOrderResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/CreateNewUserOrder"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc UpdateUserOrder(UpdateUserOrderRequest) returns (google.protobuf.Empty){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
put: "/UpdateUserOrder"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc DeleteUserOrder(DeleteUserOrderRequest) returns (google.protobuf.Empty){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
delete: "/DeleteUserOrder"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc GetUserOrder(GetUserOrderRequest) returns (GetUserOrderResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetUserOrder"
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc GetAllUserOrderByFilter(GetAllUserOrderByFilterRequest) returns (GetAllUserOrderByFilterResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetAllUserOrderByFilter"
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-11-21 10:27:20 +03:30
|
|
|
rpc SubmitShopBuyOrder(SubmitShopBuyOrderRequest) returns (SubmitShopBuyOrderResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/SubmitShopBuyOrder"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-09-27 10:36:00 +03:30
|
|
|
}
|
|
|
|
|
message CreateNewUserOrderRequest
|
|
|
|
|
{
|
|
|
|
|
int64 price = 1;
|
|
|
|
|
int64 package_id = 2;
|
|
|
|
|
google.protobuf.Int64Value transaction_id = 3;
|
|
|
|
|
bool payment_status = 4;
|
|
|
|
|
google.protobuf.Timestamp payment_date = 5;
|
2025-10-13 12:09:06 +03:30
|
|
|
int64 user_address_id = 6;
|
2025-09-27 10:36:00 +03:30
|
|
|
}
|
|
|
|
|
message CreateNewUserOrderResponse
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
}
|
|
|
|
|
message UpdateUserOrderRequest
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
2025-10-13 12:09:06 +03:30
|
|
|
google.protobuf.Int64Value transaction_id = 2;
|
2025-09-27 10:36:00 +03:30
|
|
|
}
|
|
|
|
|
message DeleteUserOrderRequest
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
}
|
|
|
|
|
message GetUserOrderRequest
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
}
|
|
|
|
|
message GetUserOrderResponse
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
int64 price = 2;
|
|
|
|
|
int64 package_id = 3;
|
|
|
|
|
google.protobuf.Int64Value transaction_id = 4;
|
|
|
|
|
bool payment_status = 5;
|
|
|
|
|
google.protobuf.Timestamp payment_date = 6;
|
|
|
|
|
int64 user_id = 7;
|
2025-10-13 08:25:31 +03:30
|
|
|
int64 user_address_id = 8;
|
2025-09-27 10:36:00 +03:30
|
|
|
}
|
|
|
|
|
message GetAllUserOrderByFilterRequest
|
|
|
|
|
{
|
|
|
|
|
PaginationState pagination_state = 1;
|
|
|
|
|
google.protobuf.StringValue sort_by = 2;
|
|
|
|
|
GetAllUserOrderByFilterFilter filter = 3;
|
|
|
|
|
}
|
|
|
|
|
message GetAllUserOrderByFilterFilter
|
|
|
|
|
{
|
|
|
|
|
google.protobuf.Int64Value id = 1;
|
|
|
|
|
google.protobuf.Int64Value price = 2;
|
|
|
|
|
google.protobuf.Int64Value package_id = 3;
|
|
|
|
|
google.protobuf.Int64Value transaction_id = 4;
|
|
|
|
|
google.protobuf.BoolValue payment_status = 5;
|
|
|
|
|
google.protobuf.Timestamp payment_date = 6;
|
|
|
|
|
google.protobuf.Int64Value user_id = 7;
|
2025-10-13 08:25:31 +03:30
|
|
|
google.protobuf.Int64Value user_address_id = 8;
|
2025-09-27 10:36:00 +03:30
|
|
|
}
|
|
|
|
|
message GetAllUserOrderByFilterResponse
|
|
|
|
|
{
|
|
|
|
|
MetaData meta_data = 1;
|
|
|
|
|
repeated GetAllUserOrderByFilterResponseModel models = 2;
|
|
|
|
|
}
|
|
|
|
|
message GetAllUserOrderByFilterResponseModel
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
int64 price = 2;
|
|
|
|
|
int64 package_id = 3;
|
|
|
|
|
google.protobuf.Int64Value transaction_id = 4;
|
|
|
|
|
bool payment_status = 5;
|
|
|
|
|
google.protobuf.Timestamp payment_date = 6;
|
|
|
|
|
int64 user_id = 7;
|
2025-10-13 08:25:31 +03:30
|
|
|
int64 user_address_id = 8;
|
2025-09-27 10:36:00 +03:30
|
|
|
}
|
2025-11-21 10:27:20 +03:30
|
|
|
message SubmitShopBuyOrderRequest
|
2025-09-27 10:36:00 +03:30
|
|
|
{
|
2025-11-21 10:27:20 +03:30
|
|
|
int64 total_amount = 1;
|
|
|
|
|
}
|
|
|
|
|
message SubmitShopBuyOrderResponse
|
|
|
|
|
{
|
|
|
|
|
int64 order_id = 1;
|
|
|
|
|
string payment_status = 2;
|
|
|
|
|
google.protobuf.Timestamp created = 3;
|
|
|
|
|
google.protobuf.StringValue payment_method = 4;
|
|
|
|
|
google.protobuf.StringValue user_address_text = 5;
|
|
|
|
|
google.protobuf.Int64Value total_amount = 6;
|
|
|
|
|
repeated SubmitShopBuyOrderFactorDetail factor_details = 7;
|
2025-09-27 10:36:00 +03:30
|
|
|
}
|
2025-11-21 10:27:20 +03:30
|
|
|
message SubmitShopBuyOrderFactorDetail
|
2025-09-27 10:36:00 +03:30
|
|
|
{
|
2025-11-21 10:27:20 +03:30
|
|
|
int64 product_id = 1;
|
|
|
|
|
string product_title = 2;
|
|
|
|
|
google.protobuf.StringValue product_thumbnail_path = 3;
|
|
|
|
|
google.protobuf.Int64Value unit_price = 4;
|
|
|
|
|
google.protobuf.Int32Value count = 5;
|
|
|
|
|
google.protobuf.Int64Value unit_discount_price = 6;
|
|
|
|
|
}
|
2025-09-27 10:36:00 +03:30
|
|
|
|
2025-11-21 10:27:20 +03:30
|
|
|
message PaginationState
|
|
|
|
|
{
|
|
|
|
|
int32 page_number = 1;
|
2025-09-27 10:36:00 +03:30
|
|
|
|
2025-11-21 10:27:20 +03:30
|
|
|
int32 page_size = 2;
|
|
|
|
|
}
|
|
|
|
|
message MetaData
|
|
|
|
|
{
|
|
|
|
|
int64 current_page = 1;
|
2025-09-27 10:36:00 +03:30
|
|
|
|
2025-11-21 10:27:20 +03:30
|
|
|
int64 total_page = 2;
|
2025-09-27 10:36:00 +03:30
|
|
|
|
2025-11-21 10:27:20 +03:30
|
|
|
int64 page_size = 3;
|
2025-09-27 10:36:00 +03:30
|
|
|
|
2025-11-21 10:27:20 +03:30
|
|
|
int64 total_count = 4;
|
2025-09-27 10:36:00 +03:30
|
|
|
|
2025-11-21 10:27:20 +03:30
|
|
|
bool has_previous = 5;
|
2025-09-27 10:36:00 +03:30
|
|
|
|
2025-11-21 10:27:20 +03:30
|
|
|
bool has_next = 6;
|
|
|
|
|
}
|
|
|
|
|
message DecimalValue
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int64 units = 1;
|
|
|
|
|
|
|
|
|
|
sfixed32 nanos = 2;
|
|
|
|
|
}
|
|
|
|
|
|