CartView.php
2.07 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
namespace common\models;
use Yii;
/**
 * This is the model class for table "{{%cart_view}}".
 *
 * @property string $id
 * @property string $account_id
 * @property string $dt
 * @property string $user_name
 * @property string $user_mail
 * @property integer $status_id
 * @property string $status
 * @property string $article
 * @property string $brand
 * @property string $descr
 * @property string $importer
 * @property string $count
 * @property double $price
 * @property string $import_id
 */
class CartView extends \backend\components\base\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%cart_view}}';
    }
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'account_id', 'dt', 'status_id', 'count', 'import_id'], 'integer'],
            [['account_id', 'user_name', 'user_mail', 'status', 'article', 'brand', 'descr', 'importer', 'count', 'price', 'import_id'], 'required'],
            [['price'], 'number'],
            [['user_name', 'user_mail'], 'string', 'max' => 150],
            [['status'], 'string', 'max' => 50],
            [['article', 'brand'], 'string', 'max' => 100],
            [['descr', 'importer'], 'string', 'max' => 254]
        ];
    }
    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'account_id' => Yii::t('app', 'Account ID'),
            'dt' => Yii::t('app', 'Dt'),
            'user_name' => Yii::t('app', 'User Name'),
            'user_mail' => Yii::t('app', 'User Mail'),
            'status_id' => Yii::t('app', 'Status ID'),
            'status' => Yii::t('app', 'Status'),
            'article' => Yii::t('app', 'Article'),
            'brand' => Yii::t('app', 'Brand'),
            'descr' => Yii::t('app', 'Descr'),
            'importer' => Yii::t('app', 'Importer'),
            'count' => Yii::t('app', 'Count'),
            'price' => Yii::t('app', 'Price'),
            'import_id' => Yii::t('app', 'Import ID'),
        ];
    }
}