feat: Add ClearCart command and response, implement CancelOrder command with validation, and enhance DeliveryStatus and User models

This commit is contained in:
masoodafar-web
2025-12-02 03:30:36 +03:30
parent 25fc73ae28
commit 78606cc5cc
100 changed files with 12925 additions and 8137 deletions
@@ -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;
}