Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 31
NotificationHistory
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 4
20.00
0.00% covered (danger)
0.00%
0 / 31
 tableName
0.00% covered (danger)
0.00%
0 / 1
2.00
0.00% covered (danger)
0.00%
0 / 3
 behaviors
0.00% covered (danger)
0.00%
0 / 1
2.00
0.00% covered (danger)
0.00%
0 / 10
 rules
0.00% covered (danger)
0.00%
0 / 1
2.00
0.00% covered (danger)
0.00%
0 / 7
 attributeLabels
0.00% covered (danger)
0.00%
0 / 1
2.00
0.00% covered (danger)
0.00%
0 / 11
<?php
namespace common\models;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
 * This is the model class for table "{{%notification_history}}".
 *
 * @property string $subject_table
 * @property string $subject_id
 * @property string $mediator_table
 * @property string $mediator_id
 * @property string $reciver_table
 * @property string $reciver_id
 * @property string $created_at
 */
class NotificationHistory extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%notification_history}}';
    }
    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        return [
            [
                'class' => TimestampBehavior::className(),
                'attributes' => [
                    static::EVENT_BEFORE_INSERT => ['created_at'],
                ],
            ],
        ];
    }
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['subject_table', 'subject_id', 'reciver_table', 'reciver_id'], 'required'],
            [['subject_id', 'mediator_id', 'reciver_id', 'created_at'], 'integer'],
            [['subject_table', 'mediator_table', 'reciver_table'], 'string', 'max' => 150],
        ];
    }
    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'subject_table' => Yii::t('app', 'Subject Table'),
            'subject_id' => Yii::t('app', 'Subject ID'),
            'mediator_table' => Yii::t('app', 'Mediator Table'),
            'mediator_id' => Yii::t('app', 'Mediator ID'),
            'reciver_table' => Yii::t('app', 'Reciver Table'),
            'reciver_id' => Yii::t('app', 'Reciver ID'),
            'created_at' => Yii::t('app', 'Created At'),
        ];
    }
}