28 lines
597 B
PHP
28 lines
597 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: chatfeed
|
|
* Date: 2022/6/13
|
|
* Time: 4:22 PM
|
|
*/
|
|
|
|
namespace common\models;
|
|
|
|
use yii\behaviors\TimestampBehavior;
|
|
use yii\db\ActiveRecord;
|
|
|
|
class Role extends \common\modelsgii\RoleMenu
|
|
{
|
|
public function behaviors()
|
|
{
|
|
return [
|
|
[
|
|
'class' => TimestampBehavior::class,
|
|
'attributes' => [
|
|
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at','updated_at'],
|
|
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
} |