// EN: Domain events for Order aggregate.
// VI: Domain events cho Order aggregate.

using MediatR;
using OrderService.Domain.AggregatesModel.OrderAggregate;

namespace OrderService.Domain.Events;

/// <summary>
/// EN: Domain event raised when an order is created.
/// VI: Domain event phát ra khi đơn hàng được tạo.
/// </summary>
public record OrderCreatedDomainEvent(Order Order) : INotification;

/// <summary>
/// EN: Domain event raised when an order is paid.
/// VI: Domain event phát ra khi đơn hàng được thanh toán.
/// </summary>
public record OrderPaidDomainEvent(Order Order) : INotification;

/// <summary>
/// EN: Domain event raised when an order is completed.
/// VI: Domain event phát ra khi đơn hàng hoàn thành.
/// </summary>
public record OrderCompletedDomainEvent(Order Order) : INotification;

/// <summary>
/// EN: Domain event raised when an order is waiting for online payment confirmation.
/// VI: Domain event phát ra khi đơn hàng đang chờ xác nhận thanh toán trực tuyến.
/// </summary>
public record OrderPaymentPendingDomainEvent(Order Order) : INotification;

/// <summary>
/// EN: Domain event raised when an order is cancelled.
/// VI: Domain event phát ra khi đơn hàng bị hủy.
/// </summary>
public record OrderCancelledDomainEvent(Order Order, string Reason) : INotification;

/// <summary>
/// EN: Domain event raised when an order is returned.
/// VI: Domain event phát ra khi đơn hàng được trả lại.
/// </summary>
public record OrderReturnedDomainEvent(Order Order) : INotification;

/// <summary>
/// EN: Domain event raised when an exchange is processed (return + new order).
/// VI: Domain event phát ra khi đổi hàng được xử lý (trả hàng + đơn mới).
/// </summary>
public record OrderExchangedDomainEvent(Order ReturnOrder, Order NewOrder) : INotification;
