<?php

namespace ModulesGarden\HostingQuotaNotifications\App\Helper\Migration;

use ModulesGarden\HostingQuotaNotifications\App\Helper\Basics\Arrays;

/**
 * Class Table
 *
 * @author Artur Pilch <artur.pi@modulesgarden.com>
 */
class Table
{
    CONST PREFIX = 'mg_hq_';

    public static function getTablesToMigrate($prefix =  true)
    {
        $tables  = [
            'Groups'       => 'groups',
            'Usage'        => 'usage',
            'DueDates'     => 'hosting_duedates',
            'Notification' => 'cycle_emails'
        ];
        return $prefix ? Arrays::addPrefixToValue($tables, SELF::PREFIX) : $tables;
    }

    public static function getTables()
    {
        $tables = ['logs', 'productgroup'];
        return Arrays::addPrefixToValue(array_merge($tables, self::getTablesToMigrate(false)),SELF::PREFIX);
    }
}