Blame view

common/models/Job.php 1.5 KB
e9013fc3   Yarik   test
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
  <?php
  
  namespace common\models;
  
  use Yii;
  
  /**
   * This is the model class for table "job".
   *
   * @property integer $job_id
   * @property string $name
   * @property string $link
   * @property string $date_start
   * @property string $date_end
   * @property string $position
   * @property integer $user_id
   * @property integer $total_count
   * @property integer $complete_count
   * @property integer $current
   */
  class Job extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'job';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['name'], 'required'],
              [['date_start', 'date_end'], 'safe'],
              [['user_id', 'total_count', 'complete_count', 'current'], 'integer'],
              [['name', 'link', 'position'], 'string', 'max' => 255]
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'job_id' => Yii::t('app', 'Job ID'),
              'name' => Yii::t('app', 'Name'),
              'link' => Yii::t('app', 'Link'),
              'date_start' => Yii::t('app', 'Date Start'),
              'date_end' => Yii::t('app', 'Date End'),
              'position' => Yii::t('app', 'Position'),
              'user_id' => Yii::t('app', 'User ID'),
              'total_count' => Yii::t('app', 'Total Count'),
              'complete_count' => Yii::t('app', 'Complete Count'),
              'current' => Yii::t('app', 'Current'),
          ];
      }
  }