Add delivery tracking fields to UserOrder entity

This commit is contained in:
masoodafar-web
2025-11-27 06:39:47 +03:30
parent 23ac9f77a1
commit 32b7cb3238
14 changed files with 1493 additions and 6 deletions
@@ -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;
}
}
}
@@ -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; }
}