package RPS::Import::PIAS::Combined::v4;

use strict;
use warnings;

use lib '/app/tools/rps/lib';
use RPS::Import::ServiceMap;

use base 'RPS::Import::PIAS::Combined::v3';

## This importer version is mapped to service DSP_PIAS_LICENSING_DEAL
## but it is pretty like PIAS combined v3 with slightly different format_tytpe logic.
## Please note: sales_files are stored in the 'pias_licensing_deal_1507/002' directory.

sub _fieldMapExtended {
    {
        mixed => {
            option1 => {
                serviceID    => 'G',
                countryCode  => 'F',
                dateBegin    => 'C10',
                dateEnd      => 'C10',
                productType  => 'H',
                formatType   => 'I',
                artistName   => 'B',
                upc          => 'E',
                albumName    => 'C',
                isrc         => 'D',
                trackName    => 'C',
                units        => 'Q',
                currencyCode => 'C9',
                retailPrice  => 'L',
                totalRevenue => 'R',
                price        => 'R',
                priceLevel   => 'I',
                mediaType    => 'H',
            },
        },
    };
}

sub _unverifiedFieldMapExtended {
    {
        mixed => {
            option1 => {
                _netUnits => 'Q',
            },
        },
    };
}

sub _headerIdentifierExtended {
    {
        mixed => {
            option1 => {
                artistName => 'ARTIST',
            },
        },
    };
}

1;
