import 'package:equatable/equatable.dart';

/// The workflow status of an [Event].
enum EventStatus {
  /// Created but incomplete.
  draft,

  /// Waiting for approval or publication.
  pending,

  /// Published and staff have been assigned.
  assigned,

  /// Fully confirmed and ready to start.
  confirmed,

  /// Currently in progress.
  active,

  /// Work has finished.
  finished,

  /// All post-event processes (invoicing) complete.
  completed,

  /// Archived.
  closed,

  /// Flagged for administrative review.
  underReview,
}

/// Represents a Job Posting or Event.
///
/// This is the central entity for scheduling work. An Event contains [EventShift]s.
class Event extends Equatable {

  const Event({
    required this.id,
    required this.businessId,
    required this.hubId,
    required this.name,
    required this.date,
    required this.status,
    required this.contractType,
  });
  /// Unique identifier.
  final String id;

  /// The [Business] hosting the event.
  final String businessId;

  /// The [Hub] location.
  final String hubId;

  /// Title of the event.
  final String name;

  /// Date of the event.
  final DateTime date;

  /// Current workflow status.
  final EventStatus status;

  /// Type of employment contract (e.g., 'freelance', 'permanent').
  final String contractType;

  @override
  List<Object?> get props => <Object?>[id, businessId, hubId, name, date, status, contractType];
}