1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
// This class was automatically generated by a giiant build task. |
4
|
|
|
// You should not change it manually as it will be overwritten on next build. |
5
|
|
|
|
6
|
|
|
namespace rhertogh\Yii2Oauth2Server\models\base; |
7
|
|
|
|
8
|
|
|
use Yii; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* This is the base-model class for table "oauth2_refresh_token". |
12
|
|
|
* |
13
|
|
|
* @property string $id |
14
|
|
|
* @property string $access_token_id |
15
|
|
|
* @property string $identifier |
16
|
|
|
* @property string $expiry_date_time |
17
|
|
|
* @property integer $enabled |
18
|
|
|
* @property integer $created_at |
19
|
|
|
* @property integer $updated_at |
20
|
|
|
* |
21
|
|
|
* @property \rhertogh\Yii2Oauth2Server\models\Oauth2AccessToken $accessToken |
22
|
|
|
* @property string $aliasModel |
23
|
|
|
* |
24
|
|
|
* phpcs:disable Generic.Files.LineLength.TooLong |
25
|
|
|
*/ |
26
|
|
|
abstract class Oauth2RefreshToken extends \rhertogh\Yii2Oauth2Server\models\base\Oauth2BaseActiveRecord |
27
|
|
|
{ |
28
|
|
|
/** |
29
|
|
|
* @inheritdoc |
30
|
|
|
*/ |
31
|
3 |
|
public function rules() |
32
|
|
|
{ |
33
|
|
|
return [ |
34
|
3 |
|
[['access_token_id', 'enabled', 'created_at', 'updated_at'], 'integer'], |
35
|
|
|
[['identifier', 'expiry_date_time', 'created_at', 'updated_at'], 'required'], |
36
|
|
|
[['expiry_date_time'], 'safe'], |
37
|
|
|
[['identifier'], 'string', 'max' => 255], |
38
|
|
|
[['identifier'], 'unique'] |
39
|
|
|
]; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @inheritdoc |
44
|
|
|
*/ |
45
|
1 |
|
public function attributeLabels() |
46
|
|
|
{ |
47
|
|
|
return [ |
48
|
1 |
|
'id' => Yii::t('oauth2', 'ID'), |
49
|
1 |
|
'access_token_id' => Yii::t('oauth2', 'Access Token ID'), |
50
|
1 |
|
'identifier' => Yii::t('oauth2', 'Identifier'), |
51
|
1 |
|
'expiry_date_time' => Yii::t('oauth2', 'Expiry Date Time'), |
52
|
1 |
|
'enabled' => Yii::t('oauth2', 'Enabled'), |
53
|
1 |
|
'created_at' => Yii::t('oauth2', 'Created At'), |
54
|
1 |
|
'updated_at' => Yii::t('oauth2', 'Updated At'), |
55
|
|
|
]; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @return \rhertogh\Yii2Oauth2Server\interfaces\models\queries\Oauth2AccessTokenQueryInterface */ |
60
|
5 |
|
public function getAccessToken() |
61
|
|
|
{ |
62
|
5 |
|
return $this->hasOne(\rhertogh\Yii2Oauth2Server\models\Oauth2AccessToken::className(), ['id' => 'access_token_id'])->inverseOf('refreshTokens'); |
|
|
|
|
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
|
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @inheritdoc |
69
|
|
|
* @return \rhertogh\Yii2Oauth2Server\interfaces\models\queries\Oauth2RefreshTokenQueryInterface the active query used by this AR class. |
70
|
|
|
*/ |
71
|
7 |
|
public static function find() |
72
|
|
|
{ |
73
|
7 |
|
return Yii::createObject(\rhertogh\Yii2Oauth2Server\interfaces\models\queries\Oauth2RefreshTokenQueryInterface::class, [get_called_class()]); |
74
|
|
|
} |
75
|
|
|
} |
76
|
|
|
|
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.