Blame view

backend/models/ImportersFiles.php 1.11 KB
d7f6bdbb   Mihail   add Importers fil...
1
2
3
4
  <?php
  
  namespace backend\models;
  
35764921   Mihail   add action and vi...
5
  use common\components\CustomVarDamp;
d7f6bdbb   Mihail   add Importers fil...
6
7
8
9
10
11
12
13
14
15
16
  use Yii;
  
  /**
   * This is the model class for table "{{%importer_files}}".
   *
   * @property integer $id
   * @property string $importer_id
   * @property string $upload_time
   * @property string $time_start
   * @property string $time_end
   */
942bad48   Mihail   adapt project to ...
17
  class ImportersFiles extends \yii\db\ActiveRecord
d7f6bdbb   Mihail   add Importers fil...
18
19
20
21
  {
      /**
       * @inheritdoc
       */
d7f6bdbb   Mihail   add Importers fil...
22
23
24
25
26
27
28
29
30
      public function rules()
      {
          return [
              [['importer_id'], 'required'],
              [['importer_id'], 'integer'],
              [['upload_time', 'time_start', 'time_end'], 'safe']
          ];
      }
  
0b2baee3   Mihail   fix errors with w...
31
32
      public function getImporter ()
      {
942bad48   Mihail   adapt project to ...
33
           return $this->hasOne(Importers::className(), ['id' => 'importer_id'])->one()->name;
0b2baee3   Mihail   fix errors with w...
34
      }
35764921   Mihail   add action and vi...
35
  
d7f6bdbb   Mihail   add Importers fil...
36
37
38
39
40
41
42
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'id' => Yii::t('app', 'ID'),
942bad48   Mihail   adapt project to ...
43
              'importer_id' => Yii::t('app', 'Importers ID'),
d7f6bdbb   Mihail   add Importers fil...
44
45
46
47
48
              'upload_time' => Yii::t('app', 'Upload Time'),
              'time_start' => Yii::t('app', 'Time Start'),
              'time_end' => Yii::t('app', 'Time End'),
          ];
      }
942bad48   Mihail   adapt project to ...
49
  }