Refactor: rename Price to Amount and update protobuf enums
This commit is contained in:
@@ -10,6 +10,26 @@ import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder";
|
||||
|
||||
enum PaymentStatus
|
||||
{
|
||||
Success = 0;
|
||||
Reject = 1;
|
||||
Pending = 2;
|
||||
}
|
||||
enum DeliveryStatus
|
||||
{
|
||||
DeliveryStatus_None = 0;
|
||||
DeliveryStatus_Pending = 1;
|
||||
DeliveryStatus_InTransit = 2;
|
||||
DeliveryStatus_Delivered = 3;
|
||||
DeliveryStatus_Returned = 4;
|
||||
}
|
||||
enum PaymentMethod
|
||||
{
|
||||
IPG = 0;
|
||||
Wallet = 1;
|
||||
}
|
||||
|
||||
service UserOrderContract
|
||||
{
|
||||
rpc CreateNewUserOrder(CreateNewUserOrderRequest) returns (CreateNewUserOrderResponse){
|
||||
@@ -60,7 +80,7 @@ message UpdateUserOrderRequest
|
||||
{
|
||||
int64 id = 1;
|
||||
// فیلدهای قدیمی (فعلاً برای سازگاری نگه داشته شدهاند)
|
||||
int64 price = 2;
|
||||
int64 amount = 2;
|
||||
int64 package_id = 3;
|
||||
google.protobuf.Int64Value transaction_id = 4;
|
||||
bool payment_status = 5;
|
||||
@@ -82,10 +102,13 @@ message GetUserOrderRequest
|
||||
message GetUserOrderResponse
|
||||
{
|
||||
int64 id = 1;
|
||||
int64 price = 2;
|
||||
int64 amount = 2;
|
||||
int64 package_id = 3;
|
||||
google.protobuf.Int64Value transaction_id = 4;
|
||||
bool payment_status = 5;
|
||||
oneof PaymentStatus_item
|
||||
{
|
||||
PaymentStatus payment_status = 5;
|
||||
}
|
||||
google.protobuf.Timestamp payment_date = 6;
|
||||
int64 user_id = 7;
|
||||
// شناسه آدرس کاربر
|
||||
@@ -94,8 +117,11 @@ message GetUserOrderResponse
|
||||
google.protobuf.StringValue user_address_text = 9;
|
||||
// جزئیات فاکتور
|
||||
repeated FactorDetailModel factor_details = 10;
|
||||
// وضعیت ارسال (مقدار عددی از DeliveryStatus در CMS)
|
||||
int32 delivery_status = 11;
|
||||
// وضعیت ارسال
|
||||
oneof DeliveryStatus_item
|
||||
{
|
||||
DeliveryStatus delivery_status = 11;
|
||||
}
|
||||
// کد رهگیری مرسوله
|
||||
google.protobuf.StringValue tracking_code = 12;
|
||||
// توضیحات وضعیت ارسال / نکات پستی
|
||||
@@ -104,8 +130,11 @@ message GetUserOrderResponse
|
||||
google.protobuf.StringValue user_full_name = 14;
|
||||
// کدملی کاربر
|
||||
google.protobuf.StringValue user_national_code = 15;
|
||||
// روش پرداخت (0=IPG,1=Wallet)
|
||||
int32 payment_method = 16;
|
||||
// روش پرداخت
|
||||
oneof PaymentMethod_item
|
||||
{
|
||||
PaymentMethod payment_method = 16;
|
||||
}
|
||||
}
|
||||
message GetAllUserOrderByFilterRequest
|
||||
{
|
||||
@@ -116,16 +145,16 @@ message GetAllUserOrderByFilterRequest
|
||||
message GetAllUserOrderByFilterFilter
|
||||
{
|
||||
google.protobuf.Int64Value id = 1;
|
||||
google.protobuf.Int64Value price = 2;
|
||||
google.protobuf.Int64Value amount = 2;
|
||||
google.protobuf.Int64Value package_id = 3;
|
||||
google.protobuf.Int64Value transaction_id = 4;
|
||||
google.protobuf.BoolValue payment_status = 5;
|
||||
google.protobuf.Int32Value payment_status = 5;
|
||||
google.protobuf.Timestamp payment_date = 6;
|
||||
google.protobuf.Int64Value user_id = 7;
|
||||
google.protobuf.Int64Value user_address_id = 8;
|
||||
// فیلتر وضعیت ارسال (مقدار عددی DeliveryStatus)
|
||||
// فیلتر وضعیت ارسال
|
||||
google.protobuf.Int32Value delivery_status = 9;
|
||||
// فیلتر روش پرداخت (0=IPG,1=Wallet)
|
||||
// فیلتر روش پرداخت
|
||||
google.protobuf.Int32Value payment_method = 10;
|
||||
}
|
||||
message GetAllUserOrderByFilterResponse
|
||||
@@ -136,18 +165,24 @@ message GetAllUserOrderByFilterResponse
|
||||
message GetAllUserOrderByFilterResponseModel
|
||||
{
|
||||
int64 id = 1;
|
||||
int64 price = 2;
|
||||
int64 amount = 2;
|
||||
int64 package_id = 3;
|
||||
google.protobuf.Int64Value transaction_id = 4;
|
||||
bool payment_status = 5;
|
||||
oneof PaymentStatus_item
|
||||
{
|
||||
PaymentStatus payment_status = 5;
|
||||
}
|
||||
google.protobuf.Timestamp payment_date = 6;
|
||||
int64 user_id = 7;
|
||||
// شناسه آدرس کاربر
|
||||
google.protobuf.Int64Value user_address_id = 8;
|
||||
// متن آدرس کاربر
|
||||
google.protobuf.StringValue user_address_text = 9;
|
||||
// وضعیت ارسال (مقدار عددی از DeliveryStatus در CMS)
|
||||
int32 delivery_status = 10;
|
||||
// وضعیت ارسال
|
||||
oneof DeliveryStatus_item
|
||||
{
|
||||
DeliveryStatus delivery_status = 10;
|
||||
}
|
||||
// کد رهگیری مرسوله
|
||||
google.protobuf.StringValue tracking_code = 11;
|
||||
// توضیحات وضعیت ارسال / نکات پستی
|
||||
@@ -156,8 +191,11 @@ message GetAllUserOrderByFilterResponseModel
|
||||
google.protobuf.StringValue user_full_name = 13;
|
||||
// کدملی کاربر
|
||||
google.protobuf.StringValue user_national_code = 14;
|
||||
// روش پرداخت (0=IPG,1=Wallet)
|
||||
int32 payment_method = 15;
|
||||
// روش پرداخت
|
||||
oneof PaymentMethod_item
|
||||
{
|
||||
PaymentMethod payment_method = 15;
|
||||
}
|
||||
}
|
||||
|
||||
// جزئیات فاکتور سفارش
|
||||
|
||||
Reference in New Issue
Block a user