import 'package:equatable/equatable.dart';

/// Represents a verified record of time worked.
///
/// Derived from [Assignment] clock-in/out times, used for payroll.
class WorkSession extends Equatable {

  const WorkSession({
    required this.id,
    required this.assignmentId,
    required this.startTime,
    this.endTime,
    required this.breakDurationMinutes,
  });
  /// Unique identifier.
  final String id;

  /// The [Assignment] this session belongs to.
  final String assignmentId;

  /// Verified start time.
  final DateTime startTime;

  /// Verified end time.
  final DateTime? endTime;

  /// Verified break duration.
  final int breakDurationMinutes;

  @override
  List<Object?> get props => <Object?>[id, assignmentId, startTime, endTime, breakDurationMinutes];
}