package BookPub::Import::Importer::EDMap::Version2;

use strict;

use lib '/app/tools/bookpub/lib';
use base 'BookPub::Import::Importer::EDMap';

sub _headerIdentifier { ( rIsbn13 => 'Print ISBN' ) }

# map version num to the field order
sub _fieldMap {
    my $self = shift;

    my %fieldMap = (
        2 => {
            dateBegin        => 'E',
            rTitle           => 'D',
            rIsbn13          => 'P',
            rInstitution     => 'A',
            serviceProductID => 'C',
            rUnits           => 'G',
            rUnitPrice       => 'Q',
            rListPrice       => 'Q',
        },
    );

    return $fieldMap{ $self->_version() };
}

sub purchaseType { BookPub::DB::Item::Sale::kPurchaseTypePrintOnDemand }
sub productType  { BookPub::DB::Item::Sale::kProductTypePhysicalBook }

1;
