27 lines
680 B
PHP
27 lines
680 B
PHP
<?php
|
|
|
|
namespace common\models\oldDb;
|
|
|
|
use yii\behaviors\TimestampBehavior;
|
|
use yii\db\ActiveRecord;
|
|
|
|
class ReplayTemplateGroup extends \common\modelsgii\oldDb\ReplayTemplateGroup
|
|
{
|
|
public function behaviors()
|
|
{
|
|
return [
|
|
[
|
|
'class' => TimestampBehavior::class,
|
|
'attributes' => [
|
|
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],
|
|
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
|
|
public function getTemplates()
|
|
{
|
|
return $this->hasMany(ReplayTemplate::className(), ['group_id' => 'id']);
|
|
}
|
|
} |