import 'order.dart';
import 'order_action_result.dart';
import 'order_status.dart';

/// Contract for fetching and managing customer orders.
abstract class OrdersRepository {
  /// Returns all orders.
  Future<List<Order>> getOrders();

  /// Updates the status of the order identified by [id].
  ///
  /// Returns an [OrderActionResult] indicating success or failure.
  Future<OrderActionResult> updateOrderStatus(String id, OrderStatus newStatus);

  /// Appends a note to the order identified by [id].
  ///
  /// Returns an [OrderActionResult] with the updated order on success.
  Future<OrderActionResult> addOrderNote(String id, String note);

  /// Creates a new order and persists it.
  ///
  /// Returns an [OrderActionResult] with the created order on success.
  Future<OrderActionResult> createOrder(Order order);
}
