import 'package:equatable/equatable.dart';

/// Status of a compliance document.
enum DocumentStatus {
  verified,
  pending,
  missing,
  rejected,
  expired
}

/// Represents a staff compliance document.
class StaffDocument extends Equatable {
  /// The unique identifier of the staff document record.
  final String id;

  /// The ID of the staff member.
  final String staffId;

  /// The ID of the document definition.
  final String documentId;

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

  /// A description of the document.
  final String? description;

  /// The status of the document.
  final DocumentStatus status;

  /// The URL of the uploaded document image/file.
  final String? documentUrl;

  /// The expiry date of the document.
  final DateTime? expiryDate;

  const StaffDocument({
    required this.id,
    required this.staffId,
    required this.documentId,
    required this.name,
    this.description,
    required this.status,
    this.documentUrl,
    this.expiryDate,
  });

  @override
  List<Object?> get props => [
        id,
        staffId,
        documentId,
        name,
        description,
        status,
        documentUrl,
        expiryDate,
      ];
}
