Details.php 1.55 KB
<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "w_details".
 *
 * @property integer $ID
 * @property integer $IMPORT_ID
 * @property string $BRAND
 * @property string $ARTICLE
 * @property string $FULL_ARTICLE
 * @property double $PRICE
 * @property string $DESCR
 * @property integer $BOX
 * @property integer $ADD_BOX
 * @property string $GROUP
 * @property string $timestamp
 */
class Details extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'w_details';
    }

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

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'IMPORT_ID' => 'Import  ID',
            'BRAND' => 'Brand',
            'ARTICLE' => 'Article',
            'FULL_ARTICLE' => 'Full  Article',
            'PRICE' => 'Price',
            'DESCR' => 'Descr',
            'BOX' => 'Box',
            'ADD_BOX' => 'Add  Box',
            'GROUP' => 'Group',
            'timestamp' => 'Timestamp',
        ];
    }
}