| @@ 7-72 (lines=66) @@ | ||
| 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; |
|
| 6 | ||
| 7 | class AuthCode extends Model |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * The database table used by the model. |
|
| 11 | * |
|
| 12 | * @var string |
|
| 13 | */ |
|
| 14 | protected $table = 'oauth_auth_codes'; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Indicates if the IDs are auto-incrementing. |
|
| 18 | * |
|
| 19 | * @var bool |
|
| 20 | */ |
|
| 21 | public $incrementing = false; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * The "type" of the primary key ID. |
|
| 25 | * |
|
| 26 | * @var string |
|
| 27 | */ |
|
| 28 | protected $keyType = 'string'; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * The guarded attributes on the model. |
|
| 32 | * |
|
| 33 | * @var array |
|
| 34 | */ |
|
| 35 | protected $guarded = []; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * The attributes that should be cast to native types. |
|
| 39 | * |
|
| 40 | * @var array |
|
| 41 | */ |
|
| 42 | protected $casts = [ |
|
| 43 | 'revoked' => 'bool', |
|
| 44 | 'scopes' => 'array', |
|
| 45 | ]; |
|
| 46 | ||
| 47 | /** |
|
| 48 | * The attributes that should be mutated to dates. |
|
| 49 | * |
|
| 50 | * @var array |
|
| 51 | */ |
|
| 52 | protected $dates = [ |
|
| 53 | 'expires_at', |
|
| 54 | ]; |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Indicates if the model should be timestamped. |
|
| 58 | * |
|
| 59 | * @var bool |
|
| 60 | */ |
|
| 61 | public $timestamps = false; |
|
| 62 | ||
| 63 | /** |
|
| 64 | * Get the client that owns the authentication code. |
|
| 65 | * |
|
| 66 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 67 | */ |
|
| 68 | public function client() |
|
| 69 | { |
|
| 70 | return $this->belongsTo(Client::class); |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| @@ 7-62 (lines=56) @@ | ||
| 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; |
|
| 6 | ||
| 7 | class Token extends Model |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * The database table used by the model. |
|
| 11 | * |
|
| 12 | * @var string |
|
| 13 | */ |
|
| 14 | protected $table = 'oauth_access_tokens'; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Indicates if the IDs are auto-incrementing. |
|
| 18 | * |
|
| 19 | * @var bool |
|
| 20 | */ |
|
| 21 | public $incrementing = false; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * The "type" of the primary key ID. |
|
| 25 | * |
|
| 26 | * @var string |
|
| 27 | */ |
|
| 28 | protected $keyType = 'string'; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * The guarded attributes on the model. |
|
| 32 | * |
|
| 33 | * @var array |
|
| 34 | */ |
|
| 35 | protected $guarded = []; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * The attributes that should be cast to native types. |
|
| 39 | * |
|
| 40 | * @var array |
|
| 41 | */ |
|
| 42 | protected $casts = [ |
|
| 43 | 'scopes' => 'array', |
|
| 44 | 'revoked' => 'bool', |
|
| 45 | ]; |
|
| 46 | ||
| 47 | /** |
|
| 48 | * The attributes that should be mutated to dates. |
|
| 49 | * |
|
| 50 | * @var array |
|
| 51 | */ |
|
| 52 | protected $dates = [ |
|
| 53 | 'expires_at', |
|
| 54 | ]; |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Indicates if the model should be timestamped. |
|
| 58 | * |
|
| 59 | * @var bool |
|
| 60 | */ |
|
| 61 | public $timestamps = false; |
|
| 62 | } |
|
| 63 | ||