feat: Add ClearCart command and response, implement CancelOrder command with validation, and enhance DeliveryStatus and User models
This commit is contained in:
@@ -49,6 +49,12 @@ service UserOrderContract
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc CancelOrder(CancelOrderRequest) returns (CancelOrderResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/CancelOrder"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
}
|
||||
message CreateNewUserOrderRequest
|
||||
{
|
||||
@@ -225,3 +231,19 @@ message SubmitShopBuyOrderResponse
|
||||
{
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
// CancelOrder Messages
|
||||
message CancelOrderRequest
|
||||
{
|
||||
int64 order_id = 1;
|
||||
string cancel_reason = 2;
|
||||
bool refund_payment = 3;
|
||||
}
|
||||
|
||||
message CancelOrderResponse
|
||||
{
|
||||
int64 order_id = 1;
|
||||
messages.DeliveryStatus status = 2;
|
||||
string message = 3;
|
||||
bool refund_processed = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user