import 'package:equatable/equatable.dart';
import 'annotation.dart';

class AnnotationPayload extends Equatable {
  final List<Annotation> annotations;
  final String baseVersionId;

  const AnnotationPayload({
    required this.annotations,
    required this.baseVersionId,
  });

  @override
  List<Object?> get props => [annotations, baseVersionId];

  Map<String, dynamic> toJson() {
    return {
      'annotations': annotations.map((a) => a.toJson()).toList(),
      'baseVersionId': baseVersionId,
    };
  }
}
