1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 
<?php
/* --------------------------------------------------------------
    GeschaeftskundenversandModuleCenterModule.inc.php 2017-06-15
    Gambio GmbH
    http://www.gambio.de
    Copyright (c) 2017 Gambio GmbH
    Released under the GNU General Public License (Version 2)
    [http://www.gnu.org/licenses/gpl-2.0.html]
    --------------------------------------------------------------
*/

/**
 * Class GeschaeftskundenversandModuleCenterModule
 *
 * @extends    AbstractModuleCenterModule
 * @category   System
 * @package    Modules
 */
class GeschaeftskundenversandModuleCenterModule extends AbstractModuleCenterModule
{
    /**
     * Initializes Geschäftskundenversand module center module
     *
     * @return void
     */
    protected function _init()
    {
        $this->title       = $this->languageTextManager->get_text('geschaeftskundenversand_title');
        $this->description = $this->languageTextManager->get_text('geschaeftskundenversand_description');
        $this->sortOrder   = 26963;
    }
    
    
    /**
     * Installs the module
     */
    public function install()
    {
        $query = 'CREATE TABLE IF NOT EXISTS `gkv_shipments` (
                    `gkv_shipments_id` INT          NOT NULL AUTO_INCREMENT ,
                    `orders_id`        INT          NOT NULL ,
                    `shipmentnumber`   VARCHAR(39)  NOT NULL ,
                    `labelurl`         VARCHAR(300) NOT NULL ,
                    `returnlabelurl`   VARCHAR(300) NOT NULL ,
                    `exportlabelurl`   VARCHAR(300) NOT NULL ,
                    `codlabelurl`      VARCHAR(300) NOT NULL ,
                    `last_modified`    TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
                    PRIMARY KEY (`gkv_shipments_id`),
                    INDEX `orders_id` (`orders_id`)
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8';
        $db    = StaticGXCoreLoader::getDatabaseQueryBuilder();
        $db->query($query);
        
        parent::install();
    }
}