import 'package:equatable/equatable.dart';

/// Worker status enum matching ApplicationStatus from Data Connect.
enum CoverageWorkerStatus {
  /// Application is pending approval.
  pending,

  /// Application has been accepted.
  accepted,

  /// Application has been rejected.
  rejected,

  /// Worker has confirmed attendance.
  confirmed,

  /// Worker has checked in.
  checkedIn,

  /// Worker has checked out.
  checkedOut,

  /// Worker is late.
  late,

  /// Worker did not show up.
  noShow,

  /// Shift is completed.
  completed,
}

/// Domain entity representing a worker in the coverage view.
///
/// This entity tracks worker status including check-in information.
class CoverageWorker extends Equatable {
  /// Creates a [CoverageWorker].
  const CoverageWorker({
    required this.name,
    required this.status,
    this.checkInTime,
  });

  /// The name of the worker.
  final String name;

  /// The status of the worker.
  final CoverageWorkerStatus status;

  /// The time the worker checked in, if applicable.
  final String? checkInTime;

  @override
  List<Object?> get props => <Object?>[name, status, checkInTime];
}
