import 'package:equatable/equatable.dart';
import 'one_time_order_position.dart';

/// Represents a customer's request for a single event or shift.
///
/// Encapsulates the date, primary location, and a list of specific [OneTimeOrderPosition] requirements.
class OneTimeOrder extends Equatable {

  const OneTimeOrder({
    required this.date,
    required this.location,
    required this.positions,
    this.vendorId,
    this.roleRates = const <String, double>{},
  });
  /// The specific date for the shift or event.
  final DateTime date;

  /// The primary location where the work will take place.
  final String location;

  /// The list of positions and headcounts required for this order.
  final List<OneTimeOrderPosition> positions;

  /// Selected vendor id for this order.
  final String? vendorId;

  /// Role hourly rates keyed by role id.
  final Map<String, double> roleRates;

  @override
  List<Object?> get props => <Object?>[
    date,
    location,
    positions,
    vendorId,
    roleRates,
  ];
}
