33 lines
858 B
PHP
33 lines
858 B
PHP
<?php
|
|
|
|
namespace common\models\oldDb;
|
|
|
|
use backend\exceptions\ApiException;
|
|
use yii\behaviors\TimestampBehavior;
|
|
use yii\db\ActiveRecord;
|
|
|
|
class Platform extends \common\modelsgii\oldDb\Platform
|
|
{
|
|
public function behaviors()
|
|
{
|
|
return [
|
|
[
|
|
'class' => TimestampBehavior::class,
|
|
'attributes' => [
|
|
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at','updated_at'],
|
|
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
|
|
// public static function findIdentityByAccessToken($token, $type = null)
|
|
// {
|
|
// $platform = Platform::findOne(['token' => $token, 'status' => StatusEnum::ACTIVE]);
|
|
// if($platform){
|
|
// return $platform->id;
|
|
// }
|
|
// return null;
|
|
// }
|
|
|
|
} |