import 'package:equatable/equatable.dart';

/// Represents a legal or service contract.
///
/// Can be between a business and the platform, or a business and staff.
class BizContract extends Equatable {

  const BizContract({
    required this.id,
    required this.businessId,
    required this.name,
    required this.startDate,
    this.endDate,
    required this.contentUrl,
  });
  /// Unique identifier.
  final String id;

  /// The [Business] party to the contract.
  final String businessId;

  /// Descriptive name of the contract.
  final String name;

  /// Valid from date.
  final DateTime startDate;

  /// Valid until date (null if indefinite).
  final DateTime? endDate;

  /// URL to the document content (PDF/HTML).
  final String contentUrl;

  @override
  List<Object?> get props => <Object?>[id, businessId, name, startDate, endDate, contentUrl];
}