DetailsCurrency.php 2.21 KB
<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%details_currency}}".
 * w_details_currency - СПЕЦИАЛЬНО СОЗАДННАЯ ВЬЮШКА ДЛЯ ДОСТУПА К СПИСКУ ТОВАРОВ С ВАЛЮТАМИ И ИХ КУРСАМИ
 * @property string $ID
 * @property string $IMPORT_ID
 * @property string $BRAND
 * @property string $ARTICLE
 * @property string $FULL_ARTICLE
 * @property double $PRICE
 * @property string $DESCR
 * @property string $BOX
 * @property string $ADD_BOX
 * @property string $GROUP
 * @property string $timestamp
 * @property string $name
 * @property double $rate
 */
class DetailsCurrency extends \backend\components\base\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%details_currency}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ID', 'IMPORT_ID', 'BOX', 'ADD_BOX'], 'integer'],
            [['IMPORT_ID', 'BRAND', 'ARTICLE', 'FULL_ARTICLE', 'PRICE', 'DESCR', 'BOX', 'name', 'rate'], 'required'],
            [['PRICE', 'rate'], 'number'],
            [['timestamp'], 'safe'],
            [['BRAND', 'ARTICLE'], 'string', 'max' => 100],
            [['FULL_ARTICLE'], 'string', 'max' => 150],
            [['DESCR', 'GROUP'], 'string', 'max' => 200],
            [['name'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => Yii::t('app', 'ID'),
            'IMPORT_ID' => Yii::t('app', 'Import  ID'),
            'BRAND' => Yii::t('app', 'Бренд'),
            'ARTICLE' => Yii::t('app', 'Имя'),
            'FULL_ARTICLE' => Yii::t('app', 'Артикул'),
            'PRICE' => Yii::t('app', 'Цена'),
            'DESCR' => Yii::t('app', 'Описание'),
            'BOX' => Yii::t('app', 'Кол-во'),
            'ADD_BOX' => Yii::t('app', 'В пути'),
            'GROUP' => Yii::t('app', 'Группа RG'),
            'timestamp' => Yii::t('app', 'Дата обновления'),
            'name' => Yii::t('app', 'Валюта'),
            'rate' => Yii::t('app', 'Курс'),
        ];
    }
}