import '../api/types.dart';

class CompleteDeliveryCommand implements Serializable {
  final int deliveryId;
  final String? deliveredAt;

  const CompleteDeliveryCommand({
    required this.deliveryId,
    this.deliveredAt,
  });

  @override
  Map<String, Object?> toJson() => {
    'deliveryId': deliveryId,
    'deliveredAt': deliveredAt,
  };
}

class MarkDeliveryAsUncompletedCommand implements Serializable {
  final int deliveryId;

  const MarkDeliveryAsUncompletedCommand({
    required this.deliveryId,
  });

  @override
  Map<String, Object?> toJson() => {
    'deliveryId': deliveryId,
  };
}

class UploadDeliveryPictureCommand implements Serializable {
  final int deliveryId;
  final String filePath;

  const UploadDeliveryPictureCommand({
    required this.deliveryId,
    required this.filePath,
  });

  @override
  Map<String, Object?> toJson() => {
    'deliveryId': deliveryId,
    'filePath': filePath,
  };
}

class SkipDeliveryCommand implements Serializable {
  final int deliveryId;

  const SkipDeliveryCommand({
    required this.deliveryId,
  });

  @override
  Map<String, Object?> toJson() => {
    'deliveryId': deliveryId,
  };
}
