import 'package:equatable/equatable.dart';

enum TimeCardStatus {
  pending,
  approved,
  paid,
  disputed;

  bool get isApproved => this == TimeCardStatus.approved;
  bool get isPaid => this == TimeCardStatus.paid;
  bool get isDisputed => this == TimeCardStatus.disputed;
  bool get isPending => this == TimeCardStatus.pending;
}

class TimeCard extends Equatable {
  final String id;
  final String shiftTitle;
  final String clientName;
  final DateTime date;
  final String startTime;
  final String endTime;
  final double totalHours;
  final double hourlyRate;
  final double totalPay;
  final TimeCardStatus status;
  final String? location;

  const TimeCard({
    required this.id,
    required this.shiftTitle,
    required this.clientName,
    required this.date,
    required this.startTime,
    required this.endTime,
    required this.totalHours,
    required this.hourlyRate,
    required this.totalPay,
    required this.status,
    this.location,
  });

  @override
  List<Object?> get props => [
        id,
        shiftTitle,
        clientName,
        date,
        startTime,
        endTime,
        totalHours,
        hourlyRate,
        totalPay,
        status,
        location,
      ];
}
