Blame view

common/models/DetailsCriteria.php 1.35 KB
8c0b2e3d   Mihail   add details descr...
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
  <?php
  
  namespace common\models;
  
  use Yii;
  
  /**
   * This is the model class for table "{{%details_criteria}}".
   *
   * @property string $name
   * @property string $brand
   * @property string $key
   * @property string $value
   * @property integer $if_tecdoc
   * @property string $filter_id
   * @property string $timestamp
   */
  class DetailsCriteria extends \backend\components\base\BaseActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return '{{%details_criteria}}';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['name', 'brand', 'key', 'value'], 'required'],
              [['if_tecdoc', 'filter_id'], 'integer'],
              [['timestamp'], 'safe'],
              [['name', 'brand'], 'string', 'max' => 100],
              [['key'], 'string', 'max' => 200],
              [['value'], 'string', 'max' => 255]
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'name' => Yii::t('app', 'Name'),
              'brand' => Yii::t('app', 'Brand'),
              'key' => Yii::t('app', 'Key'),
              'value' => Yii::t('app', 'Value'),
              'if_tecdoc' => Yii::t('app', 'If Tecdoc'),
              'filter_id' => Yii::t('app', 'Filter ID'),
              'timestamp' => Yii::t('app', 'Timestamp'),
          ];
      }
  }