Add delivery tracking fields to UserOrder entity
This commit is contained in:
+4
-2
@@ -71,7 +71,9 @@ public class
|
||||
PaymentDate = DateTime.Now,
|
||||
UserId = request.UserId,
|
||||
UserAddressId = user.UserAddresss.First(f => f.IsDefault).Id,
|
||||
TransactionId = newTransaction.Id
|
||||
TransactionId = newTransaction.Id,
|
||||
// سفارش فروشگاهی فیزیکی است، پس در ابتدا در انتظار ارسال است
|
||||
DeliveryStatus = DeliveryStatus.Pending
|
||||
};
|
||||
await _context.UserOrders.AddAsync(newOrder, cancellationToken);
|
||||
await _context.SaveChangesAsync(cancellationToken);
|
||||
@@ -92,4 +94,4 @@ public class
|
||||
};
|
||||
return finalResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-2
@@ -21,5 +21,10 @@ public record UpdateUserOrderCommand : IRequest<Unit>
|
||||
public long UserAddressId { get; init; }
|
||||
//
|
||||
public PaymentMethod? PaymentMethod { get; init; }
|
||||
|
||||
}
|
||||
// وضعیت ارسال سفارش
|
||||
public DeliveryStatus? DeliveryStatus { get; init; }
|
||||
// کد رهگیری مرسوله
|
||||
public string? TrackingCode { get; init; }
|
||||
// توضیحات ارسال
|
||||
public string? DeliveryDescription { get; init; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user