Blame view

common/modules/comment/models/Rating.php 1.26 KB
2d107e9e   Yarik   test
1
2
3
4
5
6
7
8
9
10
11
12
13
  <?php
  
  namespace common\modules\comment\models;
  
  use Yii;
  
  /**
   * This is the model class for table "rating".
   *
   * @property integer $rating_id
   * @property string $date_add
   * @property string $date_update
   * @property integer $user_id
2d107e9e   Yarik   test
14
   * @property integer $value
2fd40ee7   Yarik   test
15
16
   * @property string $model
   * @property integer $model_id
2d107e9e   Yarik   test
17
18
19
20
21
   *
   * @property \common\models\User $user
   */
  class Rating extends \yii\db\ActiveRecord
  {
2fd40ee7   Yarik   test
22
23
  
      public $rating;
2d107e9e   Yarik   test
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
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'rating';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['value'], 'integer'],
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'rating_id' => Yii::t('app', 'Rating ID'),
              'date_add' => Yii::t('app', 'Date Add'),
              'date_update' => Yii::t('app', 'Date Update'),
              'user_id' => Yii::t('app', 'User ID'),
              'entity' => Yii::t('app', 'Entity'),
              'value' => Yii::t('app', 'Value'),
          ];
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getUser()
      {
          return $this->hasOne(\common\models\User::className(), ['id' => 'user_id']);
      }
  }