<?php
namespace PortalPeople\gforce\models\carts;
use yii;
use yii\helpers\Json;

class GForce extends \common\models\DynamicModel
{

    public static function segment_title()
    {
        return 'GForce Attributes';
    }
    /**
     * Undocumented function
     *
     *    'colour' => [
     *        'rules' => [
     *            'string'
     *        ],
     *        'label' => Yii::t('app', "Colour",),
     *        'input' => 'default',
     *     ],
     * @return void
     */
    public static function localattributes()
    {
        return [
            'response_id' => [
                'rules' => [
                    ['string']
                ],
                'label' => Yii::t('app', "Response ID",),
                'input' => 'default',
            ],
            'tracking_number' => [
                'rules' => [
                    ['string']
                ],
                'label' => Yii::t('app', "Tracking Number",),
                'input' => 'default',
            ],
            'consignment_number' => [
                'rules' => [
                    ['string']
                ],
                'label' => Yii::t('app', "Consignment Number",),
                'input' => 'default',
            ],
            'status' => [
                'rules' => [
                    ['string']
                ],
                'label' => Yii::t('app', "Status",),
                'input' => 'default',
            ],
            'despatch_date' => [
                'rules' => [
                    ['string']
                ],
                'label' => Yii::t('app', "Despatch Date",),
                'input' => 'default',
            ],
            'arrived_date' => [
                'rules' => [
                    ['string']
                ],
                'label' => Yii::t('app', "Arrived Date",),
                'input' => 'default',
            ],
        ];
    }


    public function dataLoad($modelData) {
        /*if ($ext_data !== null) {
            empty($this->erpid) && array_key_exists('erpid', $ext_data) ? ( $this->erpid = $ext_data['erpid'] ? $ext_data['erpid'] : $this->erpid) : false;
            empty($this->erp_name) && array_key_exists('erp_name', $ext_data) ? ( $this->erp_name = $ext_data['erp_name'] ? $ext_data['erp_name'] : $this->erp_name) : false;
            empty($this->erp_qty) && array_key_exists('erp_qty', $ext_data) ? ( $this->erp_qty = $ext_data['erp_qty'] ? $ext_data['erp_qty'] : $this->erp_qty) : false;
            empty($this->erp_discountid) && array_key_exists('erpdiscountid', $ext_data) ? ( $this->erp_discountid = $ext_data['erpdiscountid'] ? $ext_data['erpdiscountid'] : $this->erp_discountid) : false;
            empty($this->erp_link) && array_key_exists('erp_link', $ext_data) ? ( $this->erp_link = $ext_data['erp_link'] ? $ext_data['erp_link'] : $this->erp_link) : false;
            empty($this->erp_cost) && array_key_exists('erp_cost', $ext_data) ? ( $this->erp_cost = $ext_data['erp_cost'] ? $ext_data['erp_cost'] : $this->erp_cost) : false;
            empty($this->unit) && array_key_exists('unit', $ext_data) ? ( $this->unit = $ext_data['unit'] ? $ext_data['unit'] : $this->unit) : false;
            empty($this->uom_name) && array_key_exists('uom_name', $ext_data) ? ( $this->uom_name = $ext_data['uom_name'] ? $ext_data['uom_name'] : $this->uom_name) : false;
            empty($this->haulierid) && array_key_exists('haulierid', $ext_data) ? ( $this->haulierid = $ext_data['haulierid'] ? $ext_data['haulierid'] : $this->haulierid) : false;
            empty($this->supplierid) && array_key_exists('supplierid', $ext_data) ? ( $this->supplierid = $ext_data['supplierid'] ? $ext_data['supplierid'] : $this->supplierid) : false;
        }*/
    }
}